Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/qqhann/hugo-primer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqqhann <qiu.gits@gmail.com>2019-11-30 17:59:32 +0300
committerqqhann <qiu.gits@gmail.com>2019-11-30 17:59:32 +0300
commit15008426ecf1e317189f2c243ec72b9351661a89 (patch)
treec6f678b8ce605aa69ba87b1a598c23d8e35596e5
parentc1aadc8f36f659b085558fac96f3f726546b1da2 (diff)
Update: more detailed re pattern
-rw-r--r--layouts/_default/single.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 43fabdf..b735167 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -47,7 +47,8 @@
<div id="toc" class="Box Box--blue mb-3">
<b>{{ .Title }}</b>
{{- $toc := .TableOfContents -}}
- {{- $toc := replaceRE `<ul>\n<li>\n<ul>` `<ul>` $toc -}}
+ {{- $toc := replaceRE `<nav id="TableOfContents">\n<ul>\n<li>\n<ul>` `<nav id="TableOfContents"><ul>` $toc -}}
+ {{- $toc := replaceRE `</ul>\n</li>\n</ul>\n</nav>` `</ul>\n</nav>` $toc -}}
{{- safeHTML $toc -}}
</div>
{{ end }}