Use the group by year var in the term partial

pull/145/head
Jose Galarza 2022-03-07 13:41:58 +00:00 committed by GitHub
parent 2ceab5d4b0
commit 99e9038705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -14,8 +14,10 @@
{{ end }} {{ end }}
<section> <section>
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
<h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2> {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
<hr class="border-dotted border-neutral-400 w-36" /> <h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2>
<hr class="border-dotted border-neutral-400 w-36" />
{{ end }}
{{ range .Pages }} {{ range .Pages }}
{{ partial "article-link.html" . }} {{ partial "article-link.html" . }}
{{ end }} {{ end }}