diff options
| author | Track3 <34504964+Track3@users.noreply.github.com> | 2018-12-28 23:24:34 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-28 23:24:34 +0800 |
| commit | c7ebd82a83c4fd854407f9695d22c4d969cd49ca (patch) | |
| tree | f05d3f1f73ae78a08932e788d565bb35ff7aa40c /layouts/posts/single.html | |
| parent | 1770524126121164f3b566fa74d88db536d644d3 (diff) | |
| parent | 451d527ae61cc47bf11d63d3d03054384e1bd237 (diff) | |
| download | hermit-c7ebd82a83c4fd854407f9695d22c4d969cd49ca.tar.gz | |
Merge pull request #18 from Track3/feature-toc
Add support for Table of Contents
Diffstat (limited to 'layouts/posts/single.html')
| -rw-r--r-- | layouts/posts/single.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html index e8b37a8..c84c50c 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">{{ i18n "tableOfContents" }}</div> + {{ .TableOfContents }} + </aside> + {{- end }} <div class="post-nav thin"> {{- with .NextInSection }} <a class="next-post" href="{{ .Permalink }}"> |
