Paginating future content (events)

Thanks for your suggestions, @zwbetz! I simplified things a bit to use .Unix rather than a prescriptive $date_format. This does seem to be a little bit more difficult than it should have been, but alas, a solution:

{{ $futureContent := slice }}
{{ range sort (where .Site.RegularPages "Section" "events") ".Params.start" }}
  {{ if ge (time .Params.start).Unix now.Unix }}
    {{ $futureContent = $futureContent | append . }}
  {{ end }}
{{ end }}

{{ range $futureContent }}
   {{ .Render "summary" }}
{{ end }}
1 Like