mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-21 21:58:28 +00:00
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:
parent
5e2ccc28c0
commit
2cf17c04e1
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $mainSections := .Site.Params.mainSections }}
|
{{- $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 }}
|
{{- if gt $paginator.TotalNumberOfElements 0 }}
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
{{- range $paginator.Pages }}
|
{{- range $paginator.Pages }}
|
||||||
|
|
Loading…
Reference in a new issue