{{ define "main" }} {{ with .Content }} {{ . }} {{ end }} {{ if .Parent.IsHome }} {{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) }} {{ else }} {{$.Scratch.Set "blog-pages" .Pages }} {{ end }} {{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006")}} {{ range $pag.PageGroups }}