{{ define "main" }} {{ 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")}} {{ $pageGroups := $pag.PageGroups}} {{ if eq $pag.PageNumber 1 }} {{ end }}
{{ range $pageGroups }}

{{ T "post_posts_in" }} {{ .Key }}

{{ end }}
{{ template "_internal/pagination.html" . }}
{{ end }}