{{ if not (eq .Site.Params.hide_deprecation_warnings true) }} {{ warnf "Deprecation Warning: The events shortcode is deprecated and will be removed in Hugo Solstice Theme 4.0.0." }} {{ end }} {{ $scratch := newScratch }} {{ range $index, $item := .Site.Data.events.items }} {{$t := time .expire_date }} {{ if $t.After now }} {{ $scratch.SetInMap "events" (string $index) $item }} {{ end }} {{ end }} {{ if and (isset .Site.Params "show_events") (eq .Site.Params.show_events true) (ne ($scratch.GetSortedMapValues "events") nil) }}