Skip to content

Commit

Permalink
tags: show taxonomy toc for standard installation #533
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed May 20, 2023
1 parent a2dd392 commit 6bca95a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion layouts/partials/toc.html
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 6bca95a

Please sign in to comment.