Use custom paginator's PageNumber for home-info

fixes non-mainSections pages from being displayed in the list

amend to 143eb18
This commit is contained in:
Aditya Telange 2021-02-10 21:17:40 +05:30
parent 143eb18b75
commit 1a8e14a848
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -16,10 +16,6 @@
</header>
{{- end }}
{{- if and .IsHome .Site.Params.homeInfoParams (eq .Paginator.PageNumber 1) }}
{{- partial "home_info.html" . }}
{{- end }}
{{- $pages := union .RegularPages .Sections }}
{{- if .IsHome }}
@ -27,6 +23,11 @@
{{- end}}
{{ $paginator := .Paginate $pages }}
{{- if and .IsHome .Site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
{{- partial "home_info.html" . }}
{{- end }}
{{ $term := .Data.Term}}
{{- range $index, $page := $paginator.Pages }}