mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-22 10:31:39 +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>
|
</summary>
|
||||||
|
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
{{- if (.Param "UseHugoToc") }}
|
||||||
|
{{- .TableOfContents -}}
|
||||||
|
{{- else }}
|
||||||
{{- $largest := 6 -}}
|
{{- $largest := 6 -}}
|
||||||
{{- range $headers -}}
|
{{- range $headers -}}
|
||||||
{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
|
{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
|
||||||
@ -87,6 +90,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user