1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-19 06:06:54 +00:00

feat: change TOC plugin to tocbot (#774)

This commit is contained in:
Cotes Chung
2023-03-16 02:56:54 +08:00
parent 474b4ba681
commit 02b7bd5095
13 changed files with 115 additions and 72 deletions

View File

@@ -0,0 +1,11 @@
export function toc() {
// 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
});
}