在我的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文件。
发布于 2021-09-23 13:15:34
我解决了。我检查了构建日志,发现我有一些语法错误(我没有用from typing import List list[str] List[str] )
https://stackoverflow.com/questions/69293277
复制相似问题