mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-23 03:56:23 +00:00
9 lines
357 B
HTML
9 lines
357 B
HTML
{{ $hasHeaders := gt (len (findRE "<h\\d.*?>(.|\n)*?</h\\d>" .Content)) 0 }}
|
|
{{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false) $hasHeaders) }}
|
|
<aside class="mainTOC">
|
|
<details {{ if $.Site.Data.config.openToc }}open {{ end }}>
|
|
<summary>{{ i18n "toc" }}</summary>
|
|
{{ .TableOfContents }}
|
|
</details>
|
|
</aside>
|
|
{{end}}
|