aboutsummaryrefslogtreecommitdiff
path: root/layouts/posts/single.html
diff options
context:
space:
mode:
authorTrack3 <pengliabc@live.cn>2018-12-24 22:17:22 +0800
committerTrack3 <pengliabc@live.cn>2018-12-24 22:17:22 +0800
commitfeb4c387174eb035abe10354f4dd626a5c399e90 (patch)
tree6120738f2efc44585027b2570302e8c2ae06febe /layouts/posts/single.html
parent0abf3ea0125f3666c486c0da9edb4d238e510103 (diff)
Add basic toc support
Diffstat (limited to 'layouts/posts/single.html')
-rw-r--r--layouts/posts/single.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index e8b37a8..a8b5c55 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -32,6 +32,12 @@
{{- end }}
</footer>
</article>
+ {{- if .Params.toc }}
+ <aside id="toc">
+ <div class="toc-title">Table of Contents</div>
+ {{ .TableOfContents }}
+ </aside>
+ {{- end }}
<div class="post-nav thin">
{{- with .NextInSection }}
<a class="next-post" href="{{ .Permalink }}">