ics calendar #265
@ -5,9 +5,7 @@ X-WR-CALNAME:BgLUG Events Calendar
|
|||||||
X-WR-TIMEZONE:Europe/Rome
|
X-WR-TIMEZONE:Europe/Rome
|
||||||
CALSCALE:GREGORIAN
|
CALSCALE:GREGORIAN
|
||||||
METHOD:PUBLISH
|
METHOD:PUBLISH
|
||||||
|
{{- range where .Site.Pages ".Page.Params.add_to_ics" true -}}
|
||||||
{{range where .Site.Pages ".Page.Params.add_to_ics" true -}}
|
|
||||||
|
|
||||||
{{- $location := "" -}}
|
{{- $location := "" -}}
|
||||||
{{- $locations := .Params.locations -}}
|
{{- $locations := .Params.locations -}}
|
||||||
{{- with (eq (printf "%T" $locations ) "string" ) -}}
|
{{- with (eq (printf "%T" $locations ) "string" ) -}}
|
||||||
@ -16,10 +14,9 @@ METHOD:PUBLISH
|
|||||||
{{- with (eq (printf "%T" $locations ) "[]string" ) -}}
|
{{- with (eq (printf "%T" $locations ) "[]string" ) -}}
|
||||||
{{- $location = (index $locations 0) -}}
|
{{- $location = (index $locations 0) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ if .Params.location_ics }}
|
{{- if .Params.location_ics }}
|
||||||
{{- $location = .Params.location_ics }}
|
{{- $location = .Params.location_ics }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
BEGIN:VEVENT
|
BEGIN:VEVENT
|
||||||
SUMMARY:{{.Title}}
|
SUMMARY:{{.Title}}
|
||||||
ORGANIZER;{{ .Site.Param "ics.organizer" }}
|
ORGANIZER;{{ .Site.Param "ics.organizer" }}
|
||||||
@ -35,9 +32,7 @@ URL:{{ .Permalink }}
|
|||||||
{{- $d := time.AsTime .Date }}
|
{{- $d := time.AsTime .Date }}
|
||||||
{{- $duration := .Params.duration | default "1h" }}
|
{{- $duration := .Params.duration | default "1h" }}
|
||||||
DTEND;TZID=Europe/Rome:{{dateFormat "20060102T150405Z" ($d.Add (time.ParseDuration $duration) ) }}
|
DTEND;TZID=Europe/Rome:{{dateFormat "20060102T150405Z" ($d.Add (time.ParseDuration $duration) ) }}
|
||||||
{{ end -}}
|
{{- end -}}
|
||||||
END:VEVENT
|
END:VEVENT
|
||||||
|
{{- end -}}
|
||||||
{{end -}}
|
|
||||||
|
|
||||||
END:VCALENDAR
|
END:VCALENDAR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user