Use toc_tokens to generate the TOC

This patch improves the consistency of TOC levels, so now the level is always
equal to the N in the `<hN>` tag. It also allows users of the MkDocs theme to
set the navigation depth to show in the TOC panel (defaulting to 2).
Resolves #1910 and resolves #770.
This commit is contained in:
Jim Porter
2020-02-17 14:27:12 -08:00
committed by GitHub
parent 44f3ae212d
commit 37e645d623
15 changed files with 67 additions and 150 deletions

View File

@@ -73,6 +73,9 @@ supports the following options:
* __`search`__: Display the search modal. Default: `83` (s)
* __`navigation_depth`__: The maximum depth of the navigation tree in the
sidebar. Default: `2`.
* __`nav_style`__: This adjusts the visual style for the top navigation bar; by
default, this is set to `primary` (the default), but it can also be set to
`dark` or `light`.