forked from cotes2020/jekyll-theme-chirpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "fix(deps):
tocbot
has no initialization detection (cotes202…
- Loading branch information
1 parent
d02075e
commit 241f7de
Showing
1 changed file
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}); | ||
} |