2024-04-27 12:38:19 +00:00
|
|
|
{{- $format := partial "get-format.hugo" . }}
|
|
|
|
{{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
|
2023-12-01 00:03:51 +00:00
|
|
|
{{- $pages := slice }}
|
|
|
|
{{- range .Data.Terms }}
|
2023-12-01 20:36:58 +00:00
|
|
|
{{- $count := 0 }}
|
2023-12-01 00:03:51 +00:00
|
|
|
{{- range .Pages }}
|
2024-04-24 21:05:13 +00:00
|
|
|
{{- /* count pages of term */}}
|
2023-12-01 00:03:51 +00:00
|
|
|
{{- 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 }}
|
2023-12-01 00:03:51 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2023-12-01 20:36:58 +00:00
|
|
|
{{- if $count }}
|
2024-04-27 12:38:19 +00:00
|
|
|
{{- $pages = $pages| append (dict "Title" (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true "format" $format "outputFormat" $outputFormat)) "Page" .Page "Count" $count )}}
|
2023-12-01 00:03:51 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- $pages = sort $pages ".Title" }}
|
|
|
|
{{- return $pages }}
|