feat: hide toc for short notes

This commit is contained in:
Jacky Zhao 2022-04-04 23:25:24 -07:00
parent fc4b9ded76
commit e245505082
3 changed files with 10 additions and 16 deletions

View file

@ -0,0 +1,8 @@
{{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false) (gt .WordCount 250)) }}
<aside class="mainTOC">
<details {{ if $.Site.Data.config.openToc }}open {{ end }}>
<summary>Table of Contents</summary>
{{ .TableOfContents }}
</details>
</aside>
{{end}}