{{- end }}
{{- $sections := site.Params.mainSections }}
{{/* with the follow condition, archives.html could be used for section archives other than the only one archives of the whole site */}}
{{- if .Section }}
{{- $sections = .Section}}
{{- end }}
{{- $pages := where site.AllPages "Type" "in" $sections }}
{{- 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 */}}