{{ partial "svg.html" (dict "name" "document") }} Check out all my longer posts, or read through my thoughts on others' writing.
{{- $allEvents := where .Site.RegularPages "Section" "calendar" -}} {{- $upcomingEvents := slice }} {{- range $eventPage := $allEvents -}} {{ range $eventPage.Params.timings }} {{ $event := dict "Title" $eventPage.Title "Page" $eventPage.Page "Date" (time.AsTime .starts) "Duration" (partial "iso8601.duration" .duration) }} {{ if $event.Date.Before time.Now }}{{ continue }}{{ end }} {{ $upcomingEvents = sort ($upcomingEvents | append $event) "Date" "asc" }} {{ break }}{{/* Only show the first on the list */}} {{ end }} {{- end -}} {{ if ge (len $upcomingEvents) 2 }}{{ partial "svg.html" (dict "name" "calendar") }} Maybe you'll see me at {{ (index $upcomingEvents 0).Title }} on {{ partial "year-relative-date.html" (index $upcomingEvents 0).Date }}, or {{ (index $upcomingEvents 1).Title }} on {{ partial "year-relative-date.html" (index $upcomingEvents 1).Date }}. Get in touch if you'd like to go to these, or any other events, together!
{{ end }}