Skip to content

toc_depth change to 3 by default and 2 as an exception #282

Description

@LinusSch

We currently have

markdown_extensions:
  - toc:
      toc_depth: 2

site-wide in our mkdocs.yml. This is not a very sensible default, as it creates a single-level ToC for navigating the page. Two levels, as created by toc_depth: 3 make a lot more sense for almost all well-organized pages.

However, we have several pages where the latter creates a problematically long ToC. Therefore, I intend to enable per-page overrides for this setting.

I have not figured out a way to find all pages which will need this override, any ideas will be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions