From eeec295a788acda312db2fcafc7fcb3a98d04a79 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Wed, 6 Jan 2021 14:40:06 +0100 Subject: [PATCH] Document configurability of the maximum level. Fixes #11 --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index be735c9..3e56ad4 100644 --- a/README.md +++ b/README.md @@ -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: ``` -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).