Skip to content

autodoc: option to add anchors to classes and methods #6894

@pawamoy

Description

@pawamoy

Is your feature request related to a problem? Please describe.
No, not really. It's just an UX issue. I use autodoc to auto-document classes. These classes often have a lot of methods, with long docstrings and lots of parameters, so the generated page is quite long, making it difficult to search for a particular method (Ctrl-F, I know) or have an overview of what methods the class provides. The actual problem is that I cannot (neither manually or using autodoc's options) make autodoc write anchors (headings?) for each class and method. Being able to add anchors (headings?) would allow to display them in the sidebar.

Describe the solution you'd like
I would like an autodoc option that makes it write classes or methods signatures with an anchor, so they can appear in the sidebar, effectively improving navigation in long, auto-generated reference pages.

Describe alternatives you've considered
Customize the theme used? But then it would only work for that particular theme 😕 And how would I do that? With javascript, dynamically modifying the sidebar, searching for classes and methods signatures? Seems hacky 😕

Additional context

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions