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

15 lines
564 B
HTML
Raw Normal View History

{{- $pages := slice }}
{{- range .Data.Terms }}
{{- $len := 0 }}
{{- range .Pages }}
{{- $c:=""}}{{/* count pages of term */}}
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
{{- $len = add $len 1 }}
{{- end }}
{{- end }}
{{- if $len }}
{{- $pages = $pages| append (dict "Title" (default (humanize .Page.Data.Term | strings.Title) .Page.Title) "Page" . "Len" $len )}}
{{- end }}
{{- end }}
{{- $pages = sort $pages ".Title" }}
{{- return $pages }}