From 530044033e8a9d87d5297b936e37cbfb2b5562e3 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 22 Jan 2022 00:25:35 +0530 Subject: [PATCH] Add `UseHugoToc` so that Hugo's default ToC can be used. Usage => UseHugoToc: true closes: #747 --- layouts/partials/toc.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 7a4c0198..d9b8b234 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -8,6 +8,9 @@
+ {{- if (.Param "UseHugoToc") }} + {{- .TableOfContents -}} + {{- else }} {{- $largest := 6 -}} {{- range $headers -}} {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} @@ -87,6 +90,7 @@ {{- end -}} {{- end }} + {{- end }}