Use Sphinx autosummary recursively to generate API documentation

后端 未结 2 463
温柔的废话
温柔的废话 2020-12-30 04:21

I want to use Sphinx\'s autosummary extension and templates to generate API docs recursively from docstrings. I want separate pages for each module, class, method, property

2条回答
  •  鱼传尺愫
    2020-12-30 05:14

    From Sphinx version 3.1 (June 2020), you can use the new :recursive: option to get sphinx.ext.autosummary to automatically detect every module in your package, however deeply nested, and automatically generate documentation for every attribute, class, function and exception in that module.

    See my answer here: https://stackoverflow.com/a/62613202/12014259

提交回复
热议问题