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:
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
|
||||
|
||||
{{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }}
|
||||
{{ $pages := partial "helper/pages.html" $context.Site.Home }}
|
||||
{{ $archives := $pages.GroupByDate "2006" }}
|
||||
|
||||
<div class="widget-archive--list">
|
||||
|
||||
Reference in New Issue
Block a user