Move TOC to sidebar
This commit is contained in:
parent
8ab4d0a047
commit
d59c81398d
3 changed files with 16 additions and 1 deletions
|
|
@ -63,6 +63,15 @@ series = "series"
|
||||||
[markup.goldmark.renderer]
|
[markup.goldmark.renderer]
|
||||||
unsafe = true
|
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]
|
||||||
|
|
||||||
[privacy.vimeo]
|
[privacy.vimeo]
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
</header>
|
</header>
|
||||||
{{ if .Params.toc }}
|
{{ if .Params.toc }}
|
||||||
<aside>
|
<aside>
|
||||||
{{ .TableOfContents }}
|
|
||||||
</aside>
|
</aside>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="content__body">
|
<div class="content__body">
|
||||||
|
|
@ -21,4 +20,10 @@
|
||||||
{{ if .Date }}{{ .Date.Format "2006-01-02" }}{{ end }}
|
{{ if .Date }}{{ .Date.Format "2006-01-02" }}{{ end }}
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if and (.Params.toc) (.TableOfContents) }}
|
||||||
|
<hr>
|
||||||
|
On this page:
|
||||||
|
{{ .TableOfContents }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
|
|
@ -212,3 +212,4 @@ img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue