Skip to content

Commit

Permalink
Fix broken homepage on Hugo 0.57+
Browse files Browse the repository at this point in the history
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 gohugoio/hugoThemes#682,
gohugoio/hugoThemes#678,
gohugoio/hugo#6153
  • Loading branch information
Vimux committed Aug 17, 2019
1 parent 5e2ccc2 commit 9f5ca76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 9f5ca76

Please sign in to comment.