Skip to content

Module API pages should not include h1 in their page table of contents #932

Closed
@Eric-Arellano

Description

@Eric-Arellano

We hardcode that API docs always should show h1 - h3 in the right table of contents, whereas the default is to only show h2 - h3.

in_page_toc_min_heading_level: 1

We do this because it's useful for API class pages, where it's nice to have the class name show up in the right table of contents. That's useful as a way to quickly jump to the class definition because it is non-trivial, like including the constructor and class docstring.

Screenshot 2024-02-29 at 11 08 07 AM

However, that is a bad default for module pages like https://docs.quantum.ibm.com/api/qiskit/exceptions where the page title is not very informative.

Screenshot 2024-02-29 at 11 10 01 AM

Instead, for module pages, we should keep the default of h2 being the min level to show. We should also show h4 because these module pages often have nested information that is worth rendering, although we need to preview a few pages to see what this looks like and confirm it's a good heuristic.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions