diff options
author | Xavier Valls Pla <xaviervallspla@gmail.com> | 2020-06-24 19:31:03 +0300 |
---|---|---|
committer | Xavier Valls Pla <xaviervallspla@gmail.com> | 2020-06-24 19:31:03 +0300 |
commit | 286b693f3fd68c04fe8f4546e149d7ed96b40d3f (patch) | |
tree | 061122ee9003c865df092bb07e8a505d9a0b954b /layouts | |
parent | a9a6f0c92ba89408a0527c5440ff21b30e382e10 (diff) |
add table of contents to post
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4857f1c..fa8be2d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,17 +7,20 @@ <div class="post"> <header class="post__header"> - <h1 class="post__title">{{.Title}}</h1> + <h1 id="post__title">{{.Title}}</h1> <time datetime="{{ .Date }}" class="post__date" >{{ .Date.Format $dateFormat }}</time> </header> - <article class="post__content"> - {{ partial "anchored-headings.html" .Content }} - {{ if or .Params.math .Site.Params.math }} - {{ partial "math.html" . }} - {{ end }} - </article> - {{ partial "tags.html" .}} {{ partial "post-pagination.html" .}} + <div class="article-w-ToC"> + <article class="post__content"> + {{ partial "anchored-headings.html" .Content }} + {{ if or .Params.math .Site.Params.math }} + {{ partial "math.html" . }} + {{ end }} + </article> + {{ .TableOfContents }} + </div> + {{ partial "tags.html" .}} {{ partial "post-pagination.html" .}} </div> {{ template "_internal/disqus.html" . }} |