{{- define "main" }} {{- $pages := where site.AllPages "Type" "in" site.Params.mainSections }} {{- range $pages.GroupByPublishDate "2006" }} {{- if ne .Key "0001" }}

{{- replace .Key "0001" "" }}  {{ len .Pages }}

{{- range .Pages.GroupByDate "January" }}

{{- .Key }}  {{ len .Pages }}

{{- range .Pages }} {{- if eq .Kind "page" }}

{{- .Title | markdownify }} {{- if .Draft }}  [draft]{{- end }}

{{- partial "post_meta.html" . -}}
{{- end }} {{- end }}
{{- end }}
{{- end }} {{- end }} {{- end }}{{/* end main */}}