Add option to show all pages in archive

usage =>
    In site config
    `Params.ShowAllPagesInArchive: true`
This commit is contained in:
Aditya Telange 2021-06-17 12:07:15 +05:30
parent ae4bf201d1
commit fc87fc3a29
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -10,6 +10,11 @@
</header>
{{- $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" }}
<div class="archive-year">