mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
15 lines
No EOL
642 B
Go Template
15 lines
No EOL
642 B
Go Template
{{- $pages := slice }}
|
|
{{- range .Data.Terms }}
|
|
{{- $count := 0 }}
|
|
{{- range .Pages }}
|
|
{{- /* count pages of term */}}
|
|
{{- if and .Title .RelPermalink (or (ne .Site.Params.disableTagHiddenPages true) (not (partialCached "_relearn/pageIsHiddenSelfOrAncestor.gotmpl" (dict "page" . "to" .Site.Home) .Path .Site.Home.Path) ) ) }}
|
|
{{- $count = add $count 1 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if $count }}
|
|
{{- $pages = $pages| append (dict "Title" (partial "title.gotmpl" (dict "page" .Page "linkTitle" true)) "Page" .Page "Count" $count )}}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- $pages = sort $pages ".Title" }}
|
|
{{- return $pages }} |