Add UseHugoToc so that Hugo's default ToC can be used.

Usage =>
UseHugoToc: true

closes: #747
This commit is contained in:
Aditya Telange 2022-01-22 00:25:35 +05:30
parent d52bced735
commit 530044033e
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -8,6 +8,9 @@
</summary>
<div class="inner">
{{- if (.Param "UseHugoToc") }}
{{- .TableOfContents -}}
{{- else }}
{{- $largest := 6 -}}
{{- range $headers -}}
{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
@ -87,6 +90,7 @@
{{- end -}}
{{- end }}
</ul>
{{- end }}
</div>
</details>
</div>