hugo-theme-relearn/layouts/partials/pageHelper/taxonomyPages.html

17 lines
754 B
HTML
Raw Normal View History

{{- $format := partial "get-format.hugo" . }}
{{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
{{- $pages := slice }}
{{- range .Data.Terms }}
2023-12-01 20:36:58 +00:00
{{- $count := 0 }}
{{- range .Pages }}
{{- /* count pages of term */}}
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
2023-12-01 20:36:58 +00:00
{{- $count = add $count 1 }}
{{- end }}
{{- end }}
2023-12-01 20:36:58 +00:00
{{- 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 }}