mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
taxonomy: avoid sorting issues on renamed terms #701
This commit is contained in:
parent
524d377ca2
commit
d64b8b62cd
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
||||||
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
||||||
{{- $lastCapital := "" }}
|
{{- $lastCapital := "" }}
|
||||||
{{- range .Data.Terms.Alphabetical }}
|
{{- range .Data.Terms.Alphabetical }}
|
||||||
{{- $capital := substr (default .Page.Data.Term .Page.Title) 0 1 | upper }}
|
{{- $capital := substr .Page.Data.Term 0 1 | upper }}
|
||||||
{{- if ne $lastCapital $capital }}
|
{{- if ne $lastCapital $capital }}
|
||||||
{{- if ne $lastCapital "" }}
|
{{- if ne $lastCapital "" }}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if $len }}
|
{{- if $len }}
|
||||||
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ (default .Page.Data.Term .Page.Title) }}</a> ({{ $len }})</li>
|
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ (default .Page.Data.Term .Page.Title) }}{{ if and .Page.Title (ne .Page.Data.Term .Page.Title) }} ({{ .Page.Data.Term }}){{ end }}</a> ({{ $len }})</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $lastCapital = $capital }}
|
{{- $lastCapital = $capital }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue