{{ define "main" }} {{- $section := site.Params.archives.section | default "blog" -}} {{- $dateFormat := site.Params.archives.dateFormat | default "Jan 02" -}} {{- $pages := where site.RegularPages "Section" $section -}} {{- $groups := $pages.GroupByDate "2006" "desc" -}}
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }} {{ partial "toc.html" (dict "Params" (dict "toc" false)) }}

{{ if .Title }}

{{ .Title }}

{{ end }}
{{- if $groups }} {{- range $groups }}

{{ .Key }}

{{- range .Pages }} {{- $page := . -}}
{{ .Title }} {{- with .Params.tags }} {{ partial "tags.html" (dict "context" $page) }} {{- end }}
{{- end }}
{{- end }} {{- else }}

{{ (T "noResultsFound") | default "No posts found." }}

{{- end }}
{{- end -}}