summaryrefslogtreecommitdiff
path: root/layouts/_default/single.html
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2024-12-19 17:20:34 +0800
committerEltrac <hi@guhub.cn>2024-12-19 17:20:34 +0800
commit0f37cef45e688a68fee70f26b4799e6843e65eed (patch)
tree3ae0c136fcc1b8e7c680b22bab222ba8e18efca4 /layouts/_default/single.html
parent59ae7f9d7651fe475df8a29ad74adb1aceb5a302 (diff)
perf(toc): load toc only when intended
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r--layouts/_default/single.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 51d9cacd..45c7e310 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -32,7 +32,9 @@
<!-- Post Content -->
<div id="post-content" class="post-content markdown-body">
+ {{ if .Params.toc }}
<div id="toc-container"><div id="toc"></div></div>
+ {{ end }}
{{ .Site.Params.postHeaderContent | safeHTML }}
{{ .Content }}
</div>