2022-09-24 00:17:28 +07:00
|
|
|
{{ $hasHeaders := gt (len (findRE "<h\\d.*?>(.|\n)*?</h\\d>" .Content)) 0 }}
|
|
|
|
{{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false) $hasHeaders) }}
|
2022-04-05 13:25:24 +07:00
|
|
|
<aside class="mainTOC">
|
|
|
|
<details {{ if $.Site.Data.config.openToc }}open {{ end }}>
|
2022-08-24 10:32:40 +07:00
|
|
|
<summary>{{ i18n "toc" }}</summary>
|
2022-04-05 13:25:24 +07:00
|
|
|
{{ .TableOfContents }}
|
|
|
|
</details>
|
|
|
|
</aside>
|
|
|
|
{{end}}
|