From 3440731889d241d60cfa05815e14d9c294a12889 Mon Sep 17 00:00:00 2001 From: Daniel Perry Date: Mon, 20 Nov 2023 11:15:39 -0500 Subject: [PATCH] Fix nested sections always displaying last in list --- layouts/_default/list.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9c5bc54d..9665ee9c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -45,7 +45,8 @@ {{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }} {{- end }} -{{- $paginator := .Paginate $pages }} +{{- $sorted := ($pages.ByParam "date").Reverse }} +{{- $paginator := .Paginate $sorted }} {{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} {{- partial "home_info.html" . }}