mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-10 19:05:41 +01:00
ICS variables
This commit is contained in:
parent
3ca278ace3
commit
ec14a3e573
1 changed files with 10 additions and 10 deletions
|
@ -4,9 +4,9 @@ VERSION:2.0
|
||||||
PRODID:-//www.byjp.me
|
PRODID:-//www.byjp.me
|
||||||
X-WR-CALNAME:{{ .Title }} byJP
|
X-WR-CALNAME:{{ .Title }} byJP
|
||||||
X-WR-CALDESC:{{ .Summary | replaceRE "(.{61})(.*)" "$1\r\n $2" | replaceRE "( [^\r\n]{72})([^\r\n]*)" "$1\r\n $2" }}
|
X-WR-CALDESC:{{ .Summary | replaceRE "(.{61})(.*)" "$1\r\n $2" | replaceRE "( [^\r\n]{72})([^\r\n]*)" "$1\r\n $2" }}
|
||||||
{{- range .Data.Pages}}
|
{{- range $page := .Data.Pages}}
|
||||||
BEGIN:VEVENT
|
BEGIN:VEVENT
|
||||||
UID:byjp{{replace .Page.RelPermalink "/" "-"}}
|
UID:byjp{{ replace $page.Page.RelPermalink "/" "-" | replaceRE "(.{61})(.*)" "$1\r\n $2" | replaceRE "( [^\r\n]{72})([^\r\n]*)" "$1\r\n $2" }}
|
||||||
DTSTAMP:{{ .Page.Date.UTC.Format "20060102T150405Z" }}
|
DTSTAMP:{{ .Page.Date.UTC.Format "20060102T150405Z" }}
|
||||||
{{ with (index .Params.timings 0) -}}
|
{{ with (index .Params.timings 0) -}}
|
||||||
DTSTART:{{ (time.AsTime .starts).UTC.Format "20060102T150405Z" }}
|
DTSTART:{{ (time.AsTime .starts).UTC.Format "20060102T150405Z" }}
|
||||||
|
@ -17,19 +17,19 @@ DURATION:{{ .duration }}
|
||||||
{{ range $attendees -}}
|
{{ range $attendees -}}
|
||||||
{{- if eq . "jp" }}{{ $jpDone = true }}{{ end -}}
|
{{- if eq . "jp" }}{{ $jpDone = true }}{{ end -}}
|
||||||
{{- with (index site.Data.friends .) }}
|
{{- with (index site.Data.friends .) }}
|
||||||
ATTENDEE;CUTYPE=INDIVIDUAL;CN={{ .name }} ({{site.Title}});
|
ATTENDEE;CUTYPE=INDIVIDUAL;CN={{ .name }} ({{ site.Title }});
|
||||||
PARTSTAT=ACCEPTED:MAILTO:{{ .site }}
|
PARTSTAT=ACCEPTED:MAILTO:{{ .site }}
|
||||||
{{- end }}{{ end -}}
|
{{- end }}{{ end -}}
|
||||||
{{- if not $jpDone }}
|
{{- if not $jpDone }}
|
||||||
ATTENDEE;CUTYPE=INDIVIDUAL;CN={{ site.Data.friends.jp.name }} ({{site.Title}});
|
ATTENDEE;CUTYPE=INDIVIDUAL;CN={{ site.Data.friends.jp.name }} ({{ site.Title }});
|
||||||
PARTSTAT=NEEDS-ACTION:MAILTO:{{ site.Data.friends.jp.site }}
|
PARTSTAT=NEEDS-ACTION:MAILTO:{{ site.Data.friends.jp.site }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
LOCATION:{{.Page.Params.location.name}}
|
LOCATION:{{ $page.Page.Params.location.name }}
|
||||||
GEO:{{.Page.Params.location.latitude}};{{.Page.Params.location.longitude}}
|
GEO:{{ $page.Page.Params.location.latitude }};{{ $page.Page.Params.location.longitude }}
|
||||||
SUMMARY:{{.Page.Title}}
|
SUMMARY:{{ $page.Page.Title }}
|
||||||
DESCRIPTION:{{ .Page.Summary | replaceRE "(.{62})(.*)" "$1\r\n $2" | replaceRE "( [^\r\n]{72})([^\r\n]*)" "$1\r\n $2" }}
|
DESCRIPTION:{{ $page.Page.Summary | replaceRE "(.{62})(.*)" "$1\r\n $2" | replaceRE "( [^\r\n]{72})([^\r\n]*)" "$1\r\n $2" }}
|
||||||
URL:{{.Page.Params.link | replaceRE "(.{70})(.*)" "$1\r\n $2" | replaceRE "( [^\r\n]{72})([^\r\n]*)" "$1\r\n $2" }}
|
URL:{{ $page.Page.Params.link | replaceRE "(.{70})(.*)" "$1\r\n $2" | replaceRE "( [^\r\n]{72})([^\r\n]*)" "$1\r\n $2" }}
|
||||||
END:VEVENT
|
END:VEVENT
|
||||||
{{- end }}
|
{{- end }}
|
||||||
END:VCALENDAR
|
END:VCALENDAR
|
Loading…
Reference in a new issue