perf: allow TOC to start at heading 3 (#1512)

This commit is contained in:
yeonwlee 2024-01-30 09:22:03 +09:00 committed by GitHub
parent 74f16623c9
commit bbbb66b489
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
export function toc() { export function toc() {
if (document.querySelector('main h2')) { if (document.querySelector('main h2, main h3')) {
// see: https://github.com/tscanlin/tocbot#usage // see: https://github.com/tscanlin/tocbot#usage
tocbot.init({ tocbot.init({
tocSelector: '#toc', tocSelector: '#toc',