Move TOC to sidebar

This commit is contained in:
Joe Roe 2023-05-03 15:11:00 +02:00
parent 8ab4d0a047
commit d59c81398d
No known key found for this signature in database
GPG key ID: AA48BBFC47F84086
3 changed files with 16 additions and 1 deletions

View file

@ -63,6 +63,15 @@ series = "series"
[markup.goldmark.renderer]
unsafe = true
[markup]
# Table of contents
# Add toc = true to content front matter to enable
[markup.tableOfContents]
startLevel = 2
endLevel = 3
ordered = true
[privacy]
[privacy.vimeo]

View file

@ -4,7 +4,6 @@
</header>
{{ if .Params.toc }}
<aside>
{{ .TableOfContents }}
</aside>
{{ end }}
<div class="content__body">
@ -21,4 +20,10 @@
{{ if .Date }}{{ .Date.Format "2006-01-02" }}{{ end }}
</p>
{{ end }}
{{ if and (.Params.toc) (.TableOfContents) }}
<hr>
On this page:
{{ .TableOfContents }}
{{ end }}
{{ end }}

View file

@ -212,3 +212,4 @@ img {
max-width: 100%;
height: auto;
}