Skip to content

Commit

Permalink
Revert "fix(deps): tocbot has no initialization detection (cotes202…
Browse files Browse the repository at this point in the history
…0#957)"

This reverts commit 8225174.
  • Loading branch information
HOKAGO-MEMORIES committed Jan 18, 2024
1 parent d02075e commit 241f7de
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions _javascript/modules/components/toc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
export function toc() {
if (document.querySelector('main h2')) {
// see: https://github.com/tscanlin/tocbot#usage
tocbot.init({
tocSelector: '#toc',
contentSelector: '.content',
ignoreSelector: '[data-toc-skip]',
headingSelector: 'h2, h3, h4',
orderedList: false,
scrollSmooth: false
});
}
// see: https://github.com/tscanlin/tocbot#usage
tocbot.init({
tocSelector: '#toc',
contentSelector: '.post-content',
ignoreSelector: '[data-toc-skip]',
headingSelector: 'h2, h3',
orderedList: false,
scrollSmooth: false
});
}

0 comments on commit 241f7de

Please sign in to comment.