Merge pull request #67 from netz39/feat/ics-feed

feat: add ics feed
This commit is contained in:
David 2023-11-04 23:48:57 +01:00 committed by GitHub
commit 36e32ab946
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

27
pages/events.ics Normal file
View file

@ -0,0 +1,27 @@
---
layout: null
permalink: /feed/eo-events/events.ics
hide: true
---
BEGIN:VCALENDAR
VERSION:2.0
PRODID:{{ site.url }}
METHOD:PUBLISH
{% for event in site.events -%}
{%- assign eventDate = event.event_date | date: "%Y%m%d" -%}
{%- assign currentDate = site.time | date: "%Y%m%d" -%}
{%- if eventDate >= currentDate -%}
BEGIN:VEVENT
UID:{{ event.event_date | date: "%Y%m%d" }}@netz39.de
ORGANIZER;CN="Netz39 Team":MAILTO:kontakt@netz39.de
LOCATION:Netz39 e.V.\, Leibnizstraße 32\, 39104 Magdeburg
SUMMARY:{{ event.title | remove: ',' | remove: ';' }}
DESCRIPTION:More info at {{ event.url | absolute_url }}
CLASS:PUBLIC
DTSTART;VALUE=DATE:{{ event.event_date | date: "%Y%m%d" }}
DTEND;VALUE=DATE:{{ event.event_date | date: "%Y%m%d" }}
DTSTAMP:{{ site.time | date: "%Y%m%d" }}T000000Z
END:VEVENT
{% endif -%}
{%- endfor -%}
END:VCALENDAR