【发布时间】:2021-09-23 02:21:30
【问题描述】:
在我的docs/source/conf.py 我有这个代码:
extensions = [
"sphinx.ext.autodoc",
"myst_parser",
]
source_suffix = ['.rst', '.md']
我所有的文件都在 Markdown 中,而不是在 reStructuredText 中。
在 ReadTheDocs 上,初始构建在技术上是成功的,直到模块页面“未找到”并且索引页面完全空白。
我的.readthedocs.yaml:
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Optionally build your docs in additional formats such as PDF
formats: all
# Optionally set the version of Python and requirements required to build your docs
python:
version: "3.8"
install:
- method: pip
path: .
extra_requirements:
- docs
我的setup.cfg 包含以下内容:
[options.extras_require]
docs =
sphinx
myst-parser
当然,在docs/ 中执行make clean html 完全可以。不知道为什么 ReadTheDocs 无法正确链接到来自 index.md 的其余 .md 文件。
【问题讨论】:
-
检查构建日志是否有错误。
标签: python-sphinx read-the-docs myst