Skip to content

Sub navigation broken if page doesn't start with title #770

@marcelstoer

Description

@marcelstoer

In order to avoid duplicate links in the (side) navigation it was suggested to remove the title of the page i.e. remove the header 1 or replace it with <h1> (#308 (comment)).

However, if you do this and omit the title MkDocs fails at rendering the (side) navigation correctly as it includes more than just header 1 & 2. If you start playing around with lower rank headers the behavior becomes totally incomprehensible.

mkdocs-side-navigation-error

In order to avoid any such confusion and undefined(?) behavior it might make sense to introduce a new configuration parameter that defines which max header level should be included in the navigation. That was what I initially thought was going on when I posted to your group https://groups.google.com/d/msg/mkdocs/JRufth2iBaE/L_W0ZsWlDAAJ.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions