* 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
9 lines
236 B
HTML
9 lines
236 B
HTML
{{- $result := slice -}}
|
|
|
|
{{- if or .IsHome (eq .Kind "section") (eq .Kind "taxonomy") (eq .Kind "term") -}}
|
|
{{- $pages := partial "helper/pages.html" . -}}
|
|
{{- $result = .Paginate $pages -}}
|
|
{{- end -}}
|
|
|
|
{{- return $result -}}
|