tags: show taxonomy toc for standard installation #533

This commit is contained in:
Sören Weber 2023-05-20 13:05:41 +02:00
parent a2dd392585
commit 6bca95ae28
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -1,5 +1,20 @@
<div class="default-animation progress">
<div class="toc-wrapper">
{{- .TableOfContents }}
{{- if eq .Kind "taxonomy" }}
<nav id="TableOfContents">
<ul>
{{- $lastCapital := "" }}
{{- range .Data.Terms.Alphabetical }}
{{- $capital := substr .Page.Title 0 1 | upper }}
{{- if ne $lastCapital $capital }}
<li><a href="#{{ $capital | anchorize }}">{{ $capital }}</a></li>
{{- end }}
{{- $lastCapital = $capital }}
{{- end }}
</ul>
</nav>
{{- else }}
{{- .TableOfContents }}
{{- end }}
</div>
</div>