mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-12-22 17:15:07 +01:00
Add UseHugoToc
so that Hugo's default ToC can be used.
Usage => UseHugoToc: true closes: #747
This commit is contained in:
parent
d52bced735
commit
530044033e
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user