refactor: centralize page filtering logic, and allow sort by lastmod (#1250)

* refactor: migrate page visibility control from `Params.hidden` to the new `build.list` parameter.

* refactor: centralize page filtering logic into a new `helper/pages.html` partial

* feat: introduce `SortBy` parameter to enable sorting pages by last modified date

* refactor: extract page sorting logic into a new `pages-sort.html` partial
This commit is contained in:
Jimmy
2026-01-27 12:34:15 +01:00
committed by GitHub
parent deceb17144
commit bc54cecf0a
8 changed files with 38 additions and 31 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
{{- $pages := partial "helper/pages.html" .Site.Home -}}
{{- $result := slice -}}
{{- range $pages -}}