Files
hugo-theme-stack/layouts/_partials/helper/paginator.html
T
JimmyandGitHub deceb17144 refactor: migrate page visibility control from Params.hidden to the new build.list parameter. (#1249)
* refactor: migrate page visibility control from `Params.hidden` to the new `build.list` parameter.

* Rename rss.xml to home.rss.xml
2026-01-27 12:00:40 +01:00

27 lines
697 B
HTML

{{- $pages := slice -}}
{{- $hasPages := false -}}
{{- if .IsHome -}}
{{ $pages = where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
{{- $hasPages = true -}}
{{- else if eq .Kind "term" -}}
{{ $pages = .Pages }}
{{- $hasPages = true -}}
{{- else if or (eq .Kind "section") (eq .Kind "taxonomy") -}}
{{ $subsections := .Sections }}
{{ $pages = .Pages | complement $subsections }}
{{- if eq (len $pages) 0 -}}
{{/* See complete logic in list.html */}}
{{- $pages = $subsections -}}
{{- end -}}
{{- $hasPages = true -}}
{{- end -}}
{{- if $hasPages -}}
{{ $pages = .Paginate $pages }}
{{- end -}}
{{ return $pages }}