🔧 Archives page demo shows.

This commit is contained in:
凡梦星尘
2022-07-26 22:18:43 +08:00
parent af59e93d25
commit e83dbabc3f
15 changed files with 25 additions and 126 deletions

View File

@@ -1,5 +1,7 @@
{{- if and .Page.IsSection (eq .Section "archives") }}
{{ partial "list.html" ((.Paginator (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)).Pages.GroupByDate "2006") }}
{{- else }}
{{ partial "list.html" (.Paginator.Pages.GroupByDate "2006") }}
{{- $paginator := (.Paginate (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections) ).Pages.GroupByDate "2006" }}
{{ partial "list.html" $paginator }}
{{ else }}
{{- $paginator := .Paginator.Pages.GroupByDate "2006" }}
{{ partial "list.html" $paginator }}
{{- end }}