hugo-theme-relearn/layouts/partials/pageHelper/taxonomyPages.html
Sören Weber 64b4ad751e
theme: sync Hugo templates and unification #841 #845
- description
- title
- tags
2024-04-27 14:38:19 +02:00

17 lines
No EOL
754 B
HTML

{{- $format := partial "get-format.hugo" . }}
{{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
{{- $pages := slice }}
{{- range .Data.Terms }}
{{- $count := 0 }}
{{- range .Pages }}
{{- /* count pages of term */}}
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
{{- $count = add $count 1 }}
{{- end }}
{{- end }}
{{- if $count }}
{{- $pages = $pages| append (dict "Title" (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true "format" $format "outputFormat" $outputFormat)) "Page" .Page "Count" $count )}}
{{- end }}
{{- end }}
{{- $pages = sort $pages ".Title" }}
{{- return $pages }}