Skip to content

sphinx-apidoc to generate headings for each class in separate-file mode #6788

Open
@ben-spiller

Description

@ben-spiller

Is your feature request related to a problem? Please describe.
I'm trying to use apidoc to generate documentation for a large project. Many modules are large with a number of classes in each so I use apidoc --separate mode to get them in distinct files.

The navigation pane on the left is pretty useless for navigating within my module, since the only entity that gets a heading is modules, which isn't super-useful when there's a single module in each file. Classes/functions do not have headings therefore don't show up in the navigation pane, so can be hard to locate in a large file.

Describe the solution you'd like
It'd be great if a heading could be generated for each class and (non-class) free function, so the nav pane would make it easy to jump to the one the user is interested in.

Ideally this should be an option on "automodule" so people can enable it if desired whether they're using single-file apidoc mode or not.

Describe alternatives you've considered
I'm looking at implementing a workaround using apidoc templates or autosummary to provide links at the top of the page... which will be painful but I imagine I'll get there eventually. However this feels like something that could fairly straightforwardly be provided in the box, so worth considering as an enhancement.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions