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

@@ -58,7 +58,7 @@ setup(
'Jinja2>=2.10.1',
'livereload>=2.5.1',
'lunr[languages]>=0.5.2',
'Markdown>=3.0.1',
'Markdown>=3.2.1',
'PyYAML>=3.10',
'tornado>=5.0'
],