feat(posts): render heading 4 in TOC (#1023)
This commit is contained in:
parent
c4af75389a
commit
229c2a2e2b
3 changed files with 4 additions and 6 deletions
|
@ -1,11 +1,11 @@
|
|||
export function toc() {
|
||||
if (document.querySelector('#core-wrapper h2,#core-wrapper h3')) {
|
||||
if (document.querySelector('#core-wrapper h2')) {
|
||||
// see: https://github.com/tscanlin/tocbot#usage
|
||||
tocbot.init({
|
||||
tocSelector: '#toc',
|
||||
contentSelector: '.post-content',
|
||||
ignoreSelector: '[data-toc-skip]',
|
||||
headingSelector: 'h2, h3',
|
||||
headingSelector: 'h2, h3, h4',
|
||||
orderedList: false,
|
||||
scrollSmooth: false
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ This post is to show Markdown syntax rendering on [**Chirpy**](https://github.co
|
|||
|
||||
<h3 data-toc-skip>H3 - heading</h3>
|
||||
|
||||
<h4>H4 - heading</h4>
|
||||
<h4 data-toc-skip>H4 - heading</h4>
|
||||
|
||||
## Paragraph
|
||||
|
||||
|
|
|
@ -314,9 +314,7 @@ h1 + .post-meta {
|
|||
}
|
||||
|
||||
ul {
|
||||
a {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
padding-left: 0.75rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue