1
Fork 0

Document configurability of the maximum level.

Fixes #11
This commit is contained in:
Jan-Erik Rediger 2021-01-06 14:40:06 +01:00
parent 9a9288085f
commit eeec295a78

View file

@ -34,7 +34,9 @@ Finally, build your book as normal:
mdbook path/to/book
```
## Custom TOC marker
## Configuration
### Custom TOC marker
The default marker is:
@ -42,7 +44,7 @@ The default marker is:
<!-- toc -->
```
If you wish to use a different, such as the GitLab marker `[[_TOC_]]`, you must add the following settings to your `book.toml`.
If you wish to use a different marker, such as the GitLab marker `[[_TOC_]]`, you must add the following settings to your `book.toml`.
```toml
[preprocessor.toc]
@ -71,6 +73,16 @@ marker = """* auto-gen TOC;
{:toc}"""
```
### Maximum header level
By default the ToC will include headings up to level 4 (`####`).
This can be configured in your `book.toml` as follows:
```toml
[preprocessor.toc]
max-level = 4
```
## License
MPL. See [LICENSE](LICENSE).