replace ics template

This commit is contained in:
teuserer 2024-03-13 23:10:20 +01:00
parent 1de152dbd0
commit 2bb2b2ddb8
2 changed files with 2 additions and 29 deletions

View file

@ -19,9 +19,9 @@ module Jekyll
event.summary = title event.summary = title
cal.add_event(event) cal.add_event(event)
end end
site.pages << IcalPage.new(site, site.source, 'feed', "events.ics", cal) site.pages << IcalPage.new(site, site.source, 'feed/eo-events', "events.ics", cal)
puts "Generated .ics page from #{events.length} events" puts "Generated events.ics page from #{events.length} events"
end end
end end

View file

@ -1,27 +0,0 @@
---
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