diff options
author | Matt Kohls <mattkohls13@gmail.com> | 2020-06-07 01:38:42 -0400 |
---|---|---|
committer | Matt Kohls <mattkohls13@gmail.com> | 2020-06-07 01:38:42 -0400 |
commit | d5310e86ef491cd662fd41a4d80e8e327a36bcd8 (patch) | |
tree | 00b88ce83b4a0d0d700cd7bd0858e846071d10a1 | |
parent | 0da6ee8846f597ac897646a2f33521a1efe0655c (diff) | |
download | pagedown-d5310e86ef491cd662fd41a4d80e8e327a36bcd8.tar.gz pagedown-d5310e86ef491cd662fd41a4d80e8e327a36bcd8.tar.bz2 pagedown-d5310e86ef491cd662fd41a4d80e8e327a36bcd8.zip |
Adding in table of contents
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/partials/toc.html | 6 | ||||
-rw-r--r-- | static/css/pagedown.css | 5 |
4 files changed, 16 insertions, 0 deletions
@@ -9,6 +9,9 @@ but more about making good looking, basic html. #### Shortcodes: * audio Allows for embedding of audio files. Params: src="" type="" +#### Flags +* Table of contents with toc + Copyright and Licenses ====================== diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ca37c7f..107f51f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,6 +2,8 @@ <main> {{ partial "titleblock.html" . }} + {{ partial "toc.html" . }} + {{ .Content }} </main> diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html new file mode 100644 index 0000000..ebfa8b3 --- /dev/null +++ b/layouts/partials/toc.html @@ -0,0 +1,6 @@ +{{ if (.Params.toc) }} +<aside> + <b>Table of Contents</b> + {{.TableOfContents}} +</aside> +{{ end }} diff --git a/static/css/pagedown.css b/static/css/pagedown.css index 11e33e6..ee219dc 100644 --- a/static/css/pagedown.css +++ b/static/css/pagedown.css @@ -45,6 +45,11 @@ label { margin-bottom: .25rem } +aside { + border-left-style: dotted; + padding: 1em +} + h1 { font-family: serif } |