{{- end }}
{{/* get pages from the current page's section */}}
{{/* in this way, archives.html could be used for section archives other than the only one archives of the whole site */}}
{{- $sections := site.Params.mainSections }}
{{- if .Section }}
{{- $sections = slice .Section }}
{{- end }}
{{- $pages := where (where site.RegularPages "Section" "in" $sections) "Params.hidden" "!=" true }}
{{- range $pages.GroupByPublishDate "2006" }}
{{- if ne .Key "0001" }}
{{- replace .Key "0001" "" }} {{ len .Pages }}
{{- range .Pages.GroupByDate "January" }}
{{- .Key }} {{ len .Pages }}
{{- range .Pages }}
{{- .Title | markdownify }}
{{- if .Draft }} [draft]{{- end }}
{{- partial "post_meta.html" . -}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}{{/* end main */}}