【问题标题】:Build Fail Sphinx Error contents.rst not found构建失败 Sphinx 错误 contents.rst 未找到
【发布时间】:2019-10-13 15:06:41
【问题描述】:

我按照阅读文档的说明进行操作,但出现此错误:

bash Sphinx 错误:主文件 /home/docs/checkouts/readthedocs.org/user_builds/mybinders/checkouts/latest/docs/source/contents.rst 没找到

您需要阅读 docs yaml 文件吗?

【问题讨论】:

    标签: read-the-docs


    【解决方案1】:

    我需要我的conf.py,因为我正在使用扩展,所以只需添加

    master_doc = 'contents'
    

    发给你的conf.py,然后

    将您的 index.rst 重命名为 contents.rst

    在构建通过之后,您仍然不会在 ReadTheDocs 上看到任何内容,除了“此页面仍然不存在”,只需转到:

    https://your-project.readthedocs.io/en/latest/contents.html
    

    你会在那里看到你的文档。

    【讨论】:

      【解决方案2】:

      如果您有自己的conf.py 文件,它会覆盖读取文档的默认conf.py。默认情况下,Sphinx 期望主文​​档为contents。阅读文档会将主文档设置为index(或您在设置中指定的任何内容)。尝试将此添加到您的conf.py

      master_doc = 'index'
      

      欲了解更多信息,请查看此问题:https://github.com/rtfd/readthedocs.org/issues/2569

      【讨论】:

        猜你喜欢
        • 2021-12-04
        • 2019-01-12
        • 2019-08-10
        • 1970-01-01
        • 2021-06-16
        • 2021-03-20
        • 2020-03-07
        • 2022-11-01
        • 2019-02-22
        相关资源
        最近更新 更多