Build Fail Sphinx Error contents.rst not found

不羁岁月 提交于 2021-01-20 16:18:47

问题


I follow the instructions on read the docs but I get this error:

bash Sphinx error: master file /home/docs/checkouts/readthedocs.org/user_builds/mybinders/checkouts/latest/docs/source/contents.rst not found

Do have to you the read the docs yaml file?


回答1:


If you have your own conf.py file, it overrides Read the Doc's default conf.py. By default, Sphinx expects the master doc to be contents. Read the Docs will set master doc to index instead (or whatever it is you have specified in your settings). Try adding this to your conf.py:

master_doc = 'index'

For more information, check out this issue: https://github.com/rtfd/readthedocs.org/issues/2569




回答2:


I've needed to have my conf.py because of the extensions I'm using so simply add

master_doc = 'contents'

to your conf.py and than

rename your index.rst to contents.rst.

Than after build passes OK you still won't see anything on ReadTheDocs, except "This page still doesn't exists" just go to:

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

And you'll see your docs there.



来源:https://stackoverflow.com/questions/56336234/build-fail-sphinx-error-contents-rst-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!