From 85f856482994db67d3d4e853e88e197da1c745ea Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Mon, 6 Jun 2022 01:03:58 +0200 Subject: Change the way you enable table of contents in the sidebar --- layouts/partials/sidebar-toc.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'layouts/partials') diff --git a/layouts/partials/sidebar-toc.html b/layouts/partials/sidebar-toc.html index 692643d..6306ec4 100644 --- a/layouts/partials/sidebar-toc.html +++ b/layouts/partials/sidebar-toc.html @@ -7,15 +7,17 @@

{{ .Title }}

- + {{ $toc = $toc | replaceRE `id="TableOfContents"` `class="sidebar-nav"` | safeHTML }} + {{ $toc = $toc | replaceRE "(<[/]?ul>|<[/]?ol>|<[/]?li>)" "" | safeHTML }} + {{ $toc = $toc | replaceRE `(.*)` `$2` | safeHTML }} + {{ $toc = $toc | replaceRE `