From 8921e27e1678b7378666aa37ff9ade5a2ba84c81 Mon Sep 17 00:00:00 2001 From: Michael Dorner Date: Fri, 2 Sep 2022 11:45:55 +0200 Subject: [PATCH] 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` --- layouts/_default/term.html | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 32d7ad81..5dff108c 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -13,15 +13,17 @@ {{ end }}
- {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} - {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }} -

- {{ .Key }} -

-
- {{ end }} - {{ range .Pages }} - {{ partial "article-link.html" . }} + {{ if .Data.Pages }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }} +

+ {{ .Key }} +

+
+ {{ end }} + {{ range .Pages }} + {{ partial "article-link.html" . }} + {{ end }} {{ end }} {{ end }}