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
This commit is contained in:
Vimux 2019-08-17 09:50:33 -04:00 committed by GitHub
parent 5e2ccc28c0
commit 2cf17c04e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@
</div>
{{- 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 }}
<div class="cards">
{{- range $paginator.Pages }}