Sphinx无法识别子目录

时间:2018-12-07 17:56:36

标签: python python-sphinx

我尝试为一个小示例编写简单的文档。这是我的目录布局:

..
├── docs
│   ├── build
│   │   └── modules.rst
│   ├── Makefile
│   └── source
│       ├── conf.py
│       └── index.rst
└── src
    ├── __index__.py
    └── utilities
        ├── __index__.py
        └── my_file.py

我正在尝试为my_file.py生成HTML文件

index.rst:

.. toctree::
   :maxdepth: 9
   :caption: Contents:
   :glob:
   utilities/*
   utilities

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

运行sphinx-apidoc -o build ../src仅生成modules.rst而不生成my_file.rst。如果我将my_file.rst移到src文件夹,则可以正常工作,但是我希望能够记录文件夹中的文件。

据我了解,将utilities添加到index.rst应该已经包含要记录的目录。

有什么办法告诉狮身人面像递归地找到目录吗?我的代码库很大,有成百上千个需要记录的文件夹,我宁愿不必将每个子目录添加到index.rst

0 个答案:

没有答案
相关问题