标签: autosummary

如何从自动摘要递归文档中排除模块

我有一些 Sphinx 文档,如下所示:

Browse the code-based documentation here:

.. autosummary::
   :toctree: _autosummary
   :template: custom-module-template.rst
   :recursive:

   foo
Run Code Online (Sandbox Code Playgroud)

有、、等foo的模块在哪里?有办法排除吗?foo.barfoo.bar.afoo.bazfoo.baz

python python-sphinx autosummary

6
推荐指数
1
解决办法
619
查看次数

Sphinx 递归自动摘要:重复对象警告,:noindex:选项中断链接

我正在使用 Sphinx 生成 python 包的 API 文档。目前我收到警告

WARNING: duplicate object description of package.module.submodule.Class.function other instance in generated/package.module.submodule, use :noindex: for one of them
Run Code Online (Sandbox Code Playgroud)

基本上每个函数都会产生 300 多个警告。

我的 RST 文件如下所示:

api.rst:

.. autosummary::
    :toctree: generated
    :recursive:
    :template: module-template.rst
    
    package
Run Code Online (Sandbox Code Playgroud)

模块模板.rst:

{{ fullname | escape | underline}}

{% block modules %}
{% if modules %}
.. rubric:: {{ _('Submodules') }}

.. autosummary::
   :toctree:
   :template: module-template.rst
   :recursive:
   {% for item in modules %}
      {{ item }}
   {%- endfor %}
   {% endif %}
   {% …
Run Code Online (Sandbox Code Playgroud)

python python-sphinx autosummary

5
推荐指数
1
解决办法
672
查看次数

标签 统计

autosummary ×2

python ×2

python-sphinx ×2