Commit 8b2db7b
committed
Make it possible to use a javascript-based page-level toc
Uses the https://tscanlin.github.io/tocbot/ library to build the sidebar toc
if the following is set in your config.toml file:
[params.jstoc]
enable = true
Note that by default, h2-h4 headings are included in the toc. To change that,
provide a comma-separated list of headings like this:
[params.jstoc]
enable = true
custom_headings = "h2, h3"
custom_headings = "h2, h3"
Compared to the default sidebar toc, this solution has the following benefits:
- a marker shows the current location of the screen (useful for long pages)
- shows the correct title even if the title contains a shortcode
- shows the title in the toc even if it was included from another file1 parent ac73715 commit 8b2db7b
1 file changed
+1
-1
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments