parent
8b4f99c87f
commit
8225174cb5
1 changed files with 11 additions and 9 deletions
|
@ -1,11 +1,13 @@
|
||||||
export function toc() {
|
export function toc() {
|
||||||
// see: https://github.com/tscanlin/tocbot#usage
|
if (document.querySelector('#core-wrapper h2,#core-wrapper h3')) {
|
||||||
tocbot.init({
|
// see: https://github.com/tscanlin/tocbot#usage
|
||||||
tocSelector: '#toc',
|
tocbot.init({
|
||||||
contentSelector: '.post-content',
|
tocSelector: '#toc',
|
||||||
ignoreSelector: '[data-toc-skip]',
|
contentSelector: '.post-content',
|
||||||
headingSelector: 'h2, h3',
|
ignoreSelector: '[data-toc-skip]',
|
||||||
orderedList: false,
|
headingSelector: 'h2, h3',
|
||||||
scrollSmooth: false
|
orderedList: false,
|
||||||
});
|
scrollSmooth: false
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue