Fix homepage paginator

master
Kevin C. Coram 2019-12-31 09:05:18 -08:00
parent 6ada4898f9
commit 36bfa18a1d
Signed by: kevin
GPG Key ID: 0342351B3D61AD35
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
{{ define "content" }} {{ define "content" }}
{{ $paginator := (.Paginate (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.hidden" "!=" "true" )) }}
{{ if eq .Paginator.PageNumber 1 }} {{ if eq .Paginator.PageNumber 1 }}
<article class="homepage-content h-entry e-content"> <article class="homepage-content h-entry e-content">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md --> <!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
@ -15,7 +16,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
<!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. --> <!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. -->
{{ range $index, $page := (.Paginate (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.hidden" "!=" "true" )).Pages }} {{ range $index, $page := $paginator.Pages }}
{{ if ne $index 0 }} {{ if ne $index 0 }}
{{ end }} {{ end }}
{{ .Render "summary" }} {{ .Render "summary" }}