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
This commit is contained in:
Jimmy
2026-01-27 12:00:40 +01:00
committed by GitHub
parent dc0d105e7c
commit deceb17144
8 changed files with 7 additions and 14 deletions
+1 -3
View File
@@ -3,15 +3,13 @@
{{- if .IsHome -}}
{{ $pages = where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
{{ $pages = where $pages "Params.hidden" "!=" true }}
{{- $hasPages = true -}}
{{- else if eq .Kind "term" -}}
{{ $pages = where .Pages "Params.hidden" "!=" true }}
{{ $pages = .Pages }}
{{- $hasPages = true -}}
{{- else if or (eq .Kind "section") (eq .Kind "taxonomy") -}}
{{ $subsections := .Sections }}
{{ $pages = .Pages | complement $subsections }}
{{ $pages = where $pages "Params.hidden" "!=" true }}
{{- if eq (len $pages) 0 -}}
{{/* See complete logic in list.html */}}