mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 09:46:11 +01:00
11 lines
569 B
Text
11 lines
569 B
Text
{{- $events := dict -}}
|
|
{{- range $page := . -}}
|
|
{{- range $page.Params.timings -}}
|
|
{{- $event := dict "Title" $page.Title "Page" $page.Page "Date" (time.AsTime .starts) "Duration" (partial "iso8601.duration" .duration) -}}
|
|
{{- if $event.Date.Before time.Now }}{{ continue }}{{ end -}}
|
|
{{- $bundle := $event.Date.Format "2006-01" -}}
|
|
{{- $events = merge $events (dict $bundle (sort ((index $events $bundle) | append $event) "Date" "asc")) -}}
|
|
{{- break -}}{{/* Only show the first on the list */}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- return $events -}}
|