2026-01-25 23:12:28 +01:00
|
|
|
{{- $pages := slice -}}
|
|
|
|
|
{{- $hasPages := false -}}
|
2026-01-25 17:54:13 +01:00
|
|
|
|
|
|
|
|
{{- if .IsHome -}}
|
|
|
|
|
{{ $pages = where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
|
2026-01-25 23:12:28 +01:00
|
|
|
{{- $hasPages = true -}}
|
2026-01-25 17:54:13 +01:00
|
|
|
{{- else if eq .Kind "term" -}}
|
2026-01-27 12:00:40 +01:00
|
|
|
{{ $pages = .Pages }}
|
2026-01-25 23:12:28 +01:00
|
|
|
{{- $hasPages = true -}}
|
2026-01-25 17:54:13 +01:00
|
|
|
{{- 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 -}}
|
2026-01-25 23:12:28 +01:00
|
|
|
|
|
|
|
|
{{- $hasPages = true -}}
|
2026-01-25 17:54:13 +01:00
|
|
|
{{- end -}}
|
|
|
|
|
|
2026-01-25 23:12:28 +01:00
|
|
|
{{- if $hasPages -}}
|
2026-01-25 17:54:13 +01:00
|
|
|
{{ $pages = .Paginate $pages }}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
|
|
{{ return $pages }}
|