Fix issue

Fixes issues of Hugo throwing the following error: `_default/term.html:16:14: executing "main" at <.Paginate>: error calling Paginate: cannot convert type page.PagesGroup to Pages`
pull/289/head
Michael Dorner 2022-09-02 11:45:55 +02:00 committed by GitHub
parent 2d90aca3fd
commit 8921e27e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 9 deletions

View File

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