Skip to content

autodoc: Usage/Clashes with non-python documenters #14099

@LecrisUT

Description

@LecrisUT

Is your feature request related to a problem? Please describe.
sphinx.ext.autodoc is used for documenting only python objects, and that is perfectly fine. With the recent refactoring, it is a bit clearer that there is no special sauce in there, one can replicate it for their own domain just by populating the contents appropriately.

The suggestion here for "supporting" non-python documenters is more about providing some documentation and guides for how people can replicate the workflow of sphinx-apidoc -> auto* directives -> domain-specific directives.

  • Have a tutorial for such a workflow. We can extend the recipe example and have it parse yaml files as the "auto" part there.
  • Have the sphinx.ext.autodoc directives be owned by the python domain so that it would not clash with another domain that could similarly have an automodule (e.g. CMake also has a module entity that could clash there)
  • Provide some useful helpers so that users avoid repeating themselves when constructing the content. I am primarily thinking of the context of autodoc: Parser agnostic content build helper #14051 and having a simple way of supporting more arbitrary text formats (both rst and markdown) that the content could have been written in.

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