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
1 changed files with 5 additions and 4 deletions

View File

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