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

github.com/StaticMania/portio-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/blog/single.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/blog/single.html b/layouts/blog/single.html
index 822003f..eb9bb75 100644
--- a/layouts/blog/single.html
+++ b/layouts/blog/single.html
@@ -80,6 +80,11 @@
<div class="row mt-5">
<div class="col-lg-12">
<div class="singleBlog__content">
+
+ {{ if .Params.toc }}
+ <h3>Table of Contents</h3>
+ {{ .TableOfContents | replaceRE "<ul>[[:space:]]*<li>[[:space:]]*<ul>" "<ul>" | replaceRE "</ul>[[:space:]]*</li>[[:space:]]*</ul>" "</ul>" | safeHTML }}
+ {{ end }}
{{ .Content }}
</div>
</div>