|
|
@ -1,4 +1,5 @@
|
|
|
|
{{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false) (gt .WordCount 250)) }}
|
|
|
|
{{ $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">
|
|
|
|
<aside class="mainTOC">
|
|
|
|
<details {{ if $.Site.Data.config.openToc }}open {{ end }}>
|
|
|
|
<details {{ if $.Site.Data.config.openToc }}open {{ end }}>
|
|
|
|
<summary>{{ i18n "toc" }}</summary>
|
|
|
|
<summary>{{ i18n "toc" }}</summary>
|
|
|
|