17 lines
510 B
HTML
17 lines
510 B
HTML
{{- $pages := .Pages -}}
|
|
|
|
{{- if .IsHome -}}
|
|
{{- $pages = where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
|
|
{{- else if or (eq .Kind "section") (eq .Kind "taxonomy") (eq .Kind "term") -}}
|
|
{{- $subsections := .Sections -}}
|
|
{{- $pages = .Pages | complement $subsections -}}
|
|
|
|
{{- if eq (len $pages) 0 -}}
|
|
{{- $pages = $subsections -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- $pages := partial "helper/pages-sort.html" (dict "Pages" $pages "Context" .) -}}
|
|
|
|
{{- return $pages -}}
|