Skip to content

Commit

Permalink
Merge pull request #298 from clermontech/ical
Browse files Browse the repository at this point in the history
Ical
  • Loading branch information
krichprollsch authored Nov 6, 2024
2 parents cd62ef0 + cd558e9 commit d87e7e3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions themes/hyde-custom/layouts/_default/home.calendar.ics
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
BEGIN:VCALENDAR
PRODID:planet.clermontech.org
VERSION:2.0
{{ range first 5 (sort .Site.RegularPages ".Params.event.date" "desc") }}
{{ range first 50 (sort .Site.RegularPages ".Params.event.date" "desc") }}

BEGIN:VEVENT
UID:{{ base64Encode .Params.event.Date }}
UID:{{ base64Encode .Permalink }}
DTSTART;TZID=Europe/Paris:{{ time.Format "20060102T150405" .Params.event.Date }}
DTEND;TZID=Europe/Paris:{{ time.Format "20060102T150405" ((time.AsTime .Params.event.Date).Add (time.ParseDuration "1h")) }}
ORGANIZER:{{ .Params.organizer.name }}
SUMMARY:{{ .Params.event.name }}
LOCATION:{{ .Params.event.location.full_address }}
DESCRIPTION: {{ replace .RawContent "\n" "" }}
CATEGORIES: {{ range .Params.tags }} {{ . }} {{- end}}
LOCATION:{{ .Params.event.location.friendly_name }} {{ .Params.event.location.full_address }}
DESCRIPTION:{{ replace .RawContent "\n" " " | replaceRE " +" " " }}
URL:{{ .Params.event.event_url}}
END:VEVENT
{{- end }}
END:VCALENDAR
END:VCALENDAR

0 comments on commit d87e7e3

Please sign in to comment.