mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
taxonomy: naming things #742
This commit is contained in:
parent
18061dbc06
commit
76782d06e5
3 changed files with 6 additions and 6 deletions
|
@ -20,7 +20,7 @@
|
||||||
<ul class="columnize">
|
<ul class="columnize">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $c:=""}}{{/* display terms of a taxonomy */}}
|
{{- $c:=""}}{{/* display terms of a taxonomy */}}
|
||||||
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page.Page) }}">{{ .Title }}</a> ({{ .Len }})</li>
|
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a> ({{ .Count }})</li>
|
||||||
{{- $lastCapital = $capital }}
|
{{- $lastCapital = $capital }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if ne $lastCapital "" }}
|
{{- if ne $lastCapital "" }}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{{- $pages := slice }}
|
{{- $pages := slice }}
|
||||||
{{- range .Data.Terms }}
|
{{- range .Data.Terms }}
|
||||||
{{- $len := 0 }}
|
{{- $count := 0 }}
|
||||||
{{- range .Pages }}
|
{{- range .Pages }}
|
||||||
{{- $c:=""}}{{/* count pages of term */}}
|
{{- $c:=""}}{{/* count pages of term */}}
|
||||||
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
|
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
|
||||||
{{- $len = add $len 1 }}
|
{{- $count = add $count 1 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if $len }}
|
{{- if $count }}
|
||||||
{{- $pages = $pages| append (dict "Title" (default (humanize .Page.Data.Term | strings.Title) .Page.Title) "Page" . "Len" $len )}}
|
{{- $pages = $pages| append (dict "Title" (default (humanize .Page.Data.Term | strings.Title) .Page.Title) "Page" .Page "Count" $count )}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $pages = sort $pages ".Title" }}
|
{{- $pages = sort $pages ".Title" }}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
{{- if eq .Page.Kind "taxonomy" }}
|
{{- if eq .Page.Kind "taxonomy" }}
|
||||||
{{- /* go to first term page */}}
|
{{- /* go to first term page */}}
|
||||||
{{- $pages := partialCached "partials/pageHelper/taxonomyPages.html" . . }}
|
{{- $pages := partialCached "partials/pageHelper/taxonomyPages.html" . . }}
|
||||||
{{- $next = (index $pages 0).Page.Page }}
|
{{- $next = (index $pages 0).Page }}
|
||||||
{{- else if eq .Page.Kind "term" }}
|
{{- else if eq .Page.Kind "term" }}
|
||||||
{{- /* go to next term page */}}
|
{{- /* go to next term page */}}
|
||||||
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
||||||
|
|
Loading…
Reference in a new issue