{{- define "main" }} {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{- if .Site.Params.ShowAllPagesInArchive }} {{- $pages = site.RegularPages }} {{- end }} {{- 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 */}}