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 }}
|
|
|
|
{{- $pages = $pages| append (dict "Title" (default (humanize .Page.Data.Term | strings.Title) .Page.Title) "Page" .Page "Count" $count )}}
|
2023-12-01 00:03:51 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- $pages = sort $pages ".Title" }}
|
|
|
|
{{- return $pages }}
|