Using ReadTheDocs to host Sphinx Docs created with Jupyter

不问归期 提交于 2020-01-05 07:02:11

问题


I continue to have failed builds with ReadTheDocs using a github repository with Jupyter notebooks rendered using sphinx and the readthedocs theme. I am able to render these locally, however when I try with RTD, I get the following fail message:

I tried placing the nbsphinx.py file in the repository but things still fail. Link to RTD is here:

https://readthedocs.org/projects/calculus-notes/

Github repo is here:

https://github.com/jfkoehler/calc_docs


回答1:


RTD needs to install nbsphinx. To tell RTD to install packages, you must:

  1. From RTD FAQ, My project isn’t building with autodoc:

    enable the virtualenv feature in the Admin page of your project, which will install your project into a virtualenv, and allow you to specify a requirements.txt file for your project.

  2. Create requirements.txt in your repo and add nbsphinx to its contents. See https://github.com/spatialaudio/nbsphinx/blob/0.2.14/doc/requirements.txt#L2

After you commit and push item 2 to your repo, then RTD should install nbsphinx and be able to build your docs successfully, or at least proceed to the next failure if there is one.



来源:https://stackoverflow.com/questions/46994842/using-readthedocs-to-host-sphinx-docs-created-with-jupyter

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