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:
@@ -15,7 +15,7 @@
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{ $pages := partial "helper/pages.html" .Site.Home }}
|
||||
|
||||
{{ range $pages.GroupByDate "2006" }}
|
||||
{{ $id := lower (replace .Key " " "-") }}
|
||||
|
||||
Reference in New Issue
Block a user