Indentation of Table of content?
denysdovhan opened this issue · comments
Denys Dovhan commented
I use tight
option with remark-toc
and get this result:
- [Terms](#terms)
- [Term 1](#term-1)
- [Term 2](#term-2)
- [Term 3](#term-3)
- [Organization](#organization)
- [Events](#events)
- [Resources](#resources)
- [License](#license)
Here I have indentation in 4 spaces for each level, but I prefer to use 2 spaces. Is there a way to change indentation level?
Titus commented
👋
Yup, you can set listItemIndent
to 1
in the stringification options.
Denys Dovhan commented
I didn't understand. If I have this configuration in my package.json
, where exactly should I pass this option?
{
"remarkConfig": {
"plugins": {
"toc": {
"tight": true
}
}
}
}
Titus commented
Ah, on the CLI you can store that in remarkConfig.settings
(e.g., remarkConfig: {settings: {listItemIndent: '1'}}
).
Denys Dovhan commented
Thank you 👍
Works for me!
Titus commented
Perfect!