Add table of contents shortcode (#3)

This commit is contained in:
Lukas Joswiak 2020-06-07 20:40:45 -07:00 committed by GitHub
parent f8e5ca54ec
commit e7a40d5305
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View file

@ -23,6 +23,10 @@ main#content p {
color: #f5f5f5;
}
main#content #toc h4 {
color: #d4d4d4;
}
main#content ul#posts small {
color: #a7a7a7;
}

View file

@ -18,3 +18,6 @@ pygmentsUseClasses = true
[markup.goldmark.renderer]
# Allow HTML in Markdown
unsafe = true
[markup.tableOfContents]
ordered = true

View file

@ -0,0 +1,4 @@
<aside id="toc">
<h4>Table of Contents</h4>
{{ .Page.TableOfContents }}
</aside>