2024-09-29 00:06:03 +02:00
|
|
|
BEGIN:VCALENDAR
|
|
|
|
VERSION:2.0
|
|
|
|
PRODID:-//BgLUG//BgLUG Events Calendar//EN
|
|
|
|
X-WR-CALNAME:BgLUG Events Calendar
|
|
|
|
X-WR-TIMEZONE:Europe/Rome
|
|
|
|
CALSCALE:GREGORIAN
|
|
|
|
METHOD:PUBLISH
|
|
|
|
|
2024-09-30 19:24:15 +02:00
|
|
|
{{range where .Site.Pages ".Page.Params.add_to_ics" true -}}
|
2024-09-29 00:06:03 +02:00
|
|
|
|
|
|
|
{{- $location := "" -}}
|
|
|
|
{{- $locations := .Params.locations -}}
|
|
|
|
{{- with (eq (printf "%T" $locations ) "string" ) -}}
|
|
|
|
{{- $location = $locations -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- with (eq (printf "%T" $locations ) "[]string" ) -}}
|
|
|
|
{{- $location = (index $locations 0) -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{ if .Params.location_ics }}
|
|
|
|
{{- $location = .Params.location_ics }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
BEGIN:VEVENT
|
|
|
|
SUMMARY:{{.Title}}
|
|
|
|
ORGANIZER;{{ .Site.Param "ics.organizer" }}
|
|
|
|
UID:{{ md5 .Permalink }}@bglug.it
|
|
|
|
SEQUENCE:0
|
|
|
|
STATUS:CONFIRMED
|
|
|
|
TRANSP:TRANSPARENT
|
|
|
|
LOCATION:{{ $location }}
|
|
|
|
URL:{{ .Permalink }}
|
|
|
|
{{ with .Lastmod }}DTSTAMP:{{dateFormat "20060102T150405Z" . }}
|
|
|
|
{{ end -}}
|
|
|
|
{{ if .Date }}DTSTART;TZID=Europe/Rome:{{dateFormat "20060102T150405Z" .Date }}
|
|
|
|
{{- $d := time.AsTime .Date }}
|
|
|
|
{{- $duration := .Params.duration | default "1h" }}
|
|
|
|
DTEND;TZID=Europe/Rome:{{dateFormat "20060102T150405Z" ($d.Add (time.ParseDuration $duration) ) }}
|
|
|
|
{{ end -}}
|
|
|
|
END:VEVENT
|
|
|
|
|
|
|
|
{{end -}}
|
|
|
|
|
|
|
|
END:VCALENDAR
|