问题
I am very new to read the docs. I have a documentation folder docs in my github repo created using sphinx in my local machine. I tried to link the docs to readthedocs.
From settings of the repo I added the read the docs service.
From read the docs website I imported the project.
But, the documentation in read the docs only shows the front page of index.html file. When I click any links all are empty. However, in my local machine all the links are text in it.
My github repo is this: github repo
My readthedocs link is : readthedocs docs
File Structure
- docs
- html
- rst
** conf.py - source
- Makefile
- src
The main page of index.html
In my machine when I click first link it has contents
In readthedocs website when I click first link it is EMPTEY
Note that the whole repo is same in both github website and my local machine.
All the files in computer are uploaded in github, but still readthedocs only can not find the documentation.
Question: How can we show the contents of links in ReadTheDocs ?
What am I doing wrong?
Is there a way to fix the problem or RTD only shows the front page?
Simple Test:
We can download the repo (5Mb) and run index.html which shows contents inside a0_interpolate_flux link, but if we click the same link in readthedocs given above it does not show any docstring contents.
Update
I have googled a lot and also tried read the docs website, but to no avail. I wonder how the same html page opens differently in local machine and readthedocs webhost?
Some related links are following:
[1]: https://stackoverflow.com/questions/41029181/read-the-docs-not-updating-with-new-files?rq=1
回答1:
You need to tell RTD to install your package. See RTD FAQ My project isn’t building with autodoc.
If you look at your RTD build history, and expand the third bar, you will see the import errors.
To fix it:
- Configure the RTD Admin to use a virtual environment and install your package, using a
requirements.txt
file. - Create a
requirements.txt
file and push it to your repo, specifying your project's requirements, itself included.
来源:https://stackoverflow.com/questions/45315466/rtd-read-the-docs-only-import-links-and-not-the-contents-in-it