revises tocbot configuration and documentation
This commit is contained in:
parent
b517159c0e
commit
e785ac36f1
3 changed files with 21 additions and 1 deletions
|
@ -4,3 +4,21 @@
|
|||
{{ end }}
|
||||
{{ partial "footer/font-awesome-js.html" . }}
|
||||
{{ partial "highlight-js.html" . }}
|
||||
{{ with .Site.Params.toc }}
|
||||
{{ if eq . "tocbot" }}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.1.1/tocbot.js"></script>
|
||||
<script type="text/javascript">
|
||||
if (tocbot) {
|
||||
tocbot.init({
|
||||
// Where to render the table of contents.
|
||||
tocSelector: '.toc',
|
||||
// Where to grab the headings to build the table of contents.
|
||||
contentSelector: '.post',
|
||||
// Which headings to grab inside of the contentSelector element.
|
||||
headingSelector: 'h2, h3, h4',
|
||||
collapseDepth: 4
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue