{{ define "main" -}}

{{ .Title }}

{{ with .Content }}{{ . }}{{ end -}}
{{ if (and .Parent .Parent.IsHome) -}} {{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) -}} {{ else -}} {{$.Scratch.Set "blog-pages" .Pages -}} {{ end -}} {{ if .Pages -}}
{{ $pager := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006" ) -}} {{ range $pager.PageGroups -}}
{{ T "post_posts_in" }} {{ .Key }}
{{ end -}}
{{ partial "pagination.html" . -}}
{{- end -}} {{ end -}}