diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-24 22:03:13 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-24 22:03:13 +0530 |
| commit | c06357a6041aae1a9ad7cdac5896d1fac43c7454 (patch) | |
| tree | faca5b32c13bc0292df7c201ab839bdc2737c4f4 /layouts/_default/single.html | |
| parent | bfcf89ccca27e26a0858e725b858d6c5f71960d5 (diff) | |
add Table of Contents
- can be used by
`ShowToc = true` in Single Post params
Diffstat (limited to 'layouts/_default/single.html')
| -rw-r--r-- | layouts/_default/single.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2b9ecc7..a2775fc 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,6 +12,12 @@ {{- .Date.Format "January 2, 2006" -}} </div> </header> + {{ if .Params.ShowToc }} + <blockquote> + <div class="toc">Table of Contents</div> + {{ .TableOfContents }} + </blockquote> + {{ end }} <div class="post-content">{{ .Content }}</div> {{- if .Params.tags }} <footer class="post-footer"> |
