2024-06-11 23:24:23 +02:00
|
|
|
{{/*
|
|
|
|
|
|
2026-01-15 18:01:07 +01:00
|
|
|
A copy of the toc.html partial in Docsy, modified to:
|
2024-06-11 23:24:23 +02:00
|
|
|
|
2026-01-15 18:01:07 +01:00
|
|
|
* show the page's title instead of "on this page"
|
|
|
|
|
|
|
|
|
|
*/ -}}
|
|
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
|
|
|
|
|
|
Always render the td-toc element. ScrollSpy is counting on it to exist,
|
|
|
|
|
even if it's empty.
|
|
|
|
|
|
|
|
|
|
cSpell:ignore notoc
|
|
|
|
|
*/ -}}
|
|
|
|
|
|
|
|
|
|
<div class="td-toc" data-proofer-ignore>
|
2024-06-11 23:24:23 +02:00
|
|
|
{{ if not .Params.notoc -}}
|
2026-01-15 18:01:07 +01:00
|
|
|
{{ $toc := .TableOfContents -}}
|
|
|
|
|
{{ if and $toc (ne $toc `<nav id="TableOfContents"></nav>`) -}}
|
|
|
|
|
<div class="td-toc-title">
|
|
|
|
|
<span class="td-toc-title__text">{{ .Params.Title }}</span>
|
|
|
|
|
<a class="td-toc-title__link" title="{{ i18n "toc_top_of_page" }}" href="#"></a>
|
2024-06-11 23:24:23 +02:00
|
|
|
</div>
|
2026-01-15 18:01:07 +01:00
|
|
|
{{ $toc | safeHTML }}
|
2024-06-11 23:24:23 +02:00
|
|
|
{{ end -}}
|
|
|
|
|
{{ end -}}
|
2026-01-15 18:01:07 +01:00
|
|
|
</div>
|
|
|
|
|
{{/* */ -}}
|