{{ define "header" }} {{ partial "masthead.html" . }} {{ end }} {{ define "main" }}

{{ .Title }}

{{ if .Description }}
{{ .Description }}
{{ end }}
{{ .Content }} {{ $scratch := newScratch }} {{ range .Paginator.Pages }} {{ $scratch.Add "categories" .Params.categories | first 1 }} {{ end }} {{ $categories := $scratch.Get "categories" | uniq }} {{ range $categories }}

{{ . | title }}

{{ range where $.Paginator.Pages "Params.categories" "intersect" (slice .) }}
{{ .Title }}
{{ .Description }} {{ end }}
{{ end }} {{ end }} {{ define "footer" }} {{ partial "pagination.html" . }} {{ partial "powered-by.html" . }} {{ partial "cookie-disclaimer.html" . }} {{ end }}