sorted by weight then date for pages AND sections as well

This commit is contained in:
Mohammad Faani 2023-09-26 17:20:21 -04:00
parent 65126f1751
commit e0286c3f6f

View File

@ -25,12 +25,13 @@
{{- end }}
{{- $pages := union .RegularPages .Sections }}
{{ $sortedPages := sort $pages "Params.date" "desc" }}
{{- if .IsHome }}
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- $sortedPages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- end }}
{{- $paginator := .Paginate $pages }}
{{- $paginator := .Paginate $sortedPages }}
{{- if and .IsHome .Site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
{{- partial "home_info.html" . }}