From 2cf17c04e1e70af2f295bd2a976ecc07e183c45e Mon Sep 17 00:00:00 2001 From: Vimux Date: Sat, 17 Aug 2019 09:50:33 -0400 Subject: [PATCH] Fix broken homepage on Hugo 0.57+ (#14) Hugo 0.57 breaks mainSections logic and how the home section works. Switch to .Site.RegularPages for the home page paginator to restore old behavior. Fix #13 See https://github.com/gohugoio/hugoThemes/issues/682, https://github.com/gohugoio/hugoThemes/issues/678, https://github.com/gohugoio/hugo/issues/6153 --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 0c5dcd8..ead42da 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -6,7 +6,7 @@ {{- end }} {{- $mainSections := .Site.Params.mainSections }} - {{- $paginator := .Paginate (where .Data.Pages "Section" "in" $mainSections) }} + {{- $paginator := .Paginate (where .Site.RegularPages "Type" "in" $mainSections) }} {{- if gt $paginator.TotalNumberOfElements 0 }}
{{- range $paginator.Pages }}