【发布时间】:2014-02-18 01:03:03
【问题描述】:
我了解以下为所有模块生成 rst,不包括 index.rst
sphinx-apidoc -f -o very_good_docs/ very_good
以下生成所有内容,包括 index.rst、conf.py、Makefile 等
sphinx-apidoc -F -f -o very_good_docs/ very_good
问题是 sphinx-apidoc 没有生成正确的 conf.py,所以我必须总是手动修改 conf.py 以包含正确的 sys.paths。如果我修改“very_good”文件夹中的 python 代码,我应该运行不带“-F”的 sphinx-apidoc 命令,因此 conf.py 被保留。但是,如果我直接在very_good 下添加一个新模块,没有“-F”选项,index.rst 不会更新,这意味着我的新模块不会在文档中。我想解决方案是要么只生成 index.rst 文件,要么使用“-F”选项而不覆盖 conf.py。有办法吗?
【问题讨论】:
标签: python python-sphinx sphinx-apidoc