src:源代码的文件夹。modules.rst 和 src.rst 由 sphinx-apidoc 生成。 它将文档(来自文档字符串)添加到源文件中。后处理根文档 sphinx-quickstart 创建了conf.py和根文档 index.rst。“根文档的主要功能是作为欢迎页面,并包含“目录树”(或目录树)的根。 这是 Sp
高级功能 自动生成 API 文档: 如果您的项目是一个 Python 库,Sphinx 可以与工具如 sphinx-apidoc 配合使用,直接从您的 Python 代码生成 API 文档。 国际化: Sphinx 支持文档的国际化,您可以创建多语言版本的文档。 维护和更新 随着项目的发展,定期更新和维护文档是很重要的。确保文档与代码的同步,并及时更新任何...
└── example 1. 2. 3. 4. 5. 6. 7. 8. 9. 根据py代码生成rst风格文件,这里我只生成ops/api/contrib下面的py文档 # sphinx-apidoc -F -o docs/ ops/api/contrib Creating file doc/contrib.rst. Creating file docs/conf.py. Creating file docs/index.rst. Creating file docs/Makefile. Creati...
sphinx-apidoc -f -o ./source ../src/ 就可以看到在doc/source中得到了对应的.rst文件. (-f 表示是如果已经有之前生成的.rst文件,则会删除重新生成) 文档发布 在doc文件夹下执行 make clean make html 即可在build/html中得到生成的静态网页文件,默认首页是index.html。 浏览器打开index.html即可看到生成后...
sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart 设置Sphinx 运行sphinx-quickstart,以下主要设置项目名称,作者名称以及语言(zh_CN)即可,其他默认。 $ sphinx-quickstart Welcome to the Sphinx 1.8.4 quickstart utility. Please enter values for the following settings (just press Enter to ...
$ sphinx- sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart 设置Sphinx运行sphinx-quickstart,以下主要设置项目名称,作者名称以及语言(zh_CN)即可,其他默认。$ sphinx-quickstart Welcome to the Sphinx 1.8.4 quickstart utility. Please enter values for the following settings (just press Enter to ...
当然,首先我们需要逐一的去执行sphinx-apidoc来生成一些模块化的rst文件:sphinx-apidoc -f src/hiqfermion/module1 -o docs/source/以及sphinx-apidoc -f src/hiqfermion/module2 -o docs/source/分开执行。这样我们可以把module.rst修改成这样的形式: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 module1...
运行make html此时在_build/html/py-modindex.html中没有输出.这是因为sphinx需要描述每个模块的 .rst 文件。幸运的是,使用sphinx-apidoc -o . mymodule很容易生成. 这给出了两个新文件,其中只有mymodule.rst有必要解决问题中的 modindex 问题。 $head *mod*rst ...
在doc下执行命令sphinx-apidoc -o source …/src/ 在doc下执行命令make html 切换主题 1.安装主题pip install sphinx_rtd_theme 2.修改doc/source/conf.py的html_theme html_theme = 'sphinx_rtd_theme' 3.重新生成 主题可以参考 https://www.sphinx-doc.org/en/master/examples.html#documentation-using-the...
在doc下执行命令sphinx-apidoc -o source …/src/ 在doc下执行命令make html 切换主题 1.安装主题pip install sphinx_rtd_theme 2.修改doc/source/conf.py的html_theme html_theme='sphinx_rtd_theme' 3.重新生成 主题可以参考 https://www.sphinx-doc.org/en/master/examples.html#documentation-using-the-al...