Skip to content

Use TOC Extension's new toc_tokens to build TOC #1910

@rockandska

Description

@rockandska

Hi Mkdocs,

It seems that the attribute "level" for page.toc items is not the level of the "hx" in the markdown documents but the "global" level

With a title :

# title 1    ------> level 0
## title 2  -------> level 1
### titile 3 ------> level 2

If there is not title :

## title 2  -------> level 0
### titile 3 ------> level 1

Is there anyway to get the real level of headings ?

# title 1    ------> level 1
## title 2  -------> level 2
### titile 3 ------> level 3
## title 2  -------> level 2
### titile 3 ------> level 3

Regards,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions