【发布时间】:2025-12-05 19:40:02
【问题描述】:
我正在尝试为 Python 项目生成 Sphinx 文档并使用 Read The Docs 托管文档。项目代码为here。当我运行 make clean && make html 在本地生成文档时,文档会生成并包含我的所有四个 Python 模块:
Local Docs
我已阅读连接到 Github 的文档以生成有关新提交的文档,它成功地为我的 2/4 的 Python 模块生成了文档,但其中两个没有出现。 Read The Docs 构建似乎运行没有错误: Read The Docs
我的本地构建有一些警告,但它们似乎与未出现的文档无关:
$ make clean && make html
Removing everything under '_build'...
Running Sphinx v3.2.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [100%] source/modules
/<home>/argos-translate/argostranslate/package.py:docstring of argostranslate.package.Package:24: WARNING: Unexpected indentation.
/<home>/argos-translate/argostranslate/package.py:docstring of argostranslate.package.Package:30: WARNING: Block quote ends without a blank line; unexpected unindent.
/<home>/argos-translate/argostranslate/translate.py:docstring of argostranslate.translate.Language:7: WARNING: Unexpected indentation.
/<home>/argos-translate/argostranslate/translate.py:docstring of argostranslate.translate.Language:8: WARNING: Block quote ends without a blank line; unexpected unindent.
looking for now-outdated files... none found
pickling environment... done
checking consistency... /<home>/argos-translate/docs/source/modules.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [100%] source/modules
generating indices... genindex py-modindexdone
writing additional pages... searchdone
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 5 warnings.
The HTML pages are in _build/html.
【问题讨论】:
标签: python python-sphinx read-the-docs