ics calendar #265
@ -1,3 +1,4 @@
|
|||||||
|
{{- $numcaratteri := 66 }}
|
||||||
BEGIN:VCALENDAR
|
BEGIN:VCALENDAR
|
||||||
VERSION:2.0
|
VERSION:2.0
|
||||||
PRODID:-//BgLUG//BgLUG Events Calendar//EN
|
PRODID:-//BgLUG//BgLUG Events Calendar//EN
|
||||||
@ -5,18 +6,6 @@ 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 -}}
|
|
||||||
{{- $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:VTIMEZONE
|
BEGIN:VTIMEZONE
|
||||||
TZID:Europe/Rome
|
TZID:Europe/Rome
|
||||||
LAST-MODIFIED:20240422T053451Z
|
LAST-MODIFIED:20240422T053451Z
|
||||||
@ -37,6 +26,25 @@ DTSTART:19701025T030000
|
|||||||
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
|
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
|
||||||
END:STANDARD
|
END:STANDARD
|
||||||
END:VTIMEZONE
|
END:VTIMEZONE
|
||||||
|
{{- range where .Site.Pages ".Page.Params.add_to_ics" true -}}
|
||||||
|
{{- $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 }}
|
||||||
|
{{- $description := "" }}
|
||||||
|
{{- with .Description }}
|
||||||
|
{{- $description = . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Summary }}
|
||||||
|
{{- $description = . }}
|
||||||
|
{{- end }}
|
||||||
BEGIN:VEVENT
|
BEGIN:VEVENT
|
||||||
SUMMARY:{{.Title}}
|
SUMMARY:{{.Title}}
|
||||||
ORGANIZER;{{ .Site.Param "ics.organizer" }}
|
ORGANIZER;{{ .Site.Param "ics.organizer" }}
|
||||||
@ -44,6 +52,18 @@ UID:{{ md5 .Permalink }}@bglug.it
|
|||||||
SEQUENCE:0
|
SEQUENCE:0
|
||||||
STATUS:CONFIRMED
|
STATUS:CONFIRMED
|
||||||
TRANSP:TRANSPARENT
|
TRANSP:TRANSPARENT
|
||||||
|
|
||||||
|
{{- if ne $description "" }}
|
||||||
|
{{- $description = replace $description "\n" " " }}
|
||||||
|
{{- $description = (print "DESCRIPTION:" $description ) | truncate 400 }}
|
||||||
|
{{- $l := $description | len }}
|
||||||
|
{{- $i := 0 }}
|
||||||
|
{{- range seq 0 $numcaratteri $l }}
|
||||||
|
{{ strings.Repeat $i " " }}{{- substr $description . $numcaratteri }}
|
||||||
|
{{- $i = add $i 1 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
LOCATION:{{ $location }}
|
LOCATION:{{ $location }}
|
||||||
URL:{{ .Permalink }}
|
URL:{{ .Permalink }}
|
||||||
{{ with .Lastmod }}DTSTAMP:{{dateFormat "20060102T150405Z" . }}
|
{{ with .Lastmod }}DTSTAMP:{{dateFormat "20060102T150405Z" . }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user