readthedocs.org: "Edit on GitHub" url broken for sphinx projects
Details
- Read the Docs project URL: https://jsxc.readthedocs.io
- Build URL (if applicable): https://github.com/jsxc/documentation
Expected Result
“Edit on GitHub”, “View on GitHub” and so on should link to https://github.com/jsxc/documentation.
Actual Result
Those links points to https://github.com/jsxc/documentation/blob/master/home/docs/checkouts/readthedocs.org/user_builds/jsxc/checkouts/latest/conf.py/index.rst
As you can see the string /home/docs/checkouts/readthedocs.org/user_builds/jsxc/checkouts/latest/conf.py
is added to the url. The only thing that I can think of, is that I have currently no tags in my repo. Maybe this is the reason, I don’t know.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 17 (7 by maintainers)
This should now be deployed. It will likely require a doc rebuild to fix.
I can confirm that we have the same issue with Sphinx.
https://identitymodel.readthedocs.io/en/latest/client/discovery.html edit points to https://github.com/IdentityModel/IdentityModel2/blob/master/home/docs/checkouts/readthedocs.org/user_builds/identitymodel/checkouts/latest/docs/conf.py/client/discovery.rst
We don’t have a schedule for deploys, but I’d say next week or so
I have a PR that fixes this https://github.com/rtfd/readthedocs.org/pull/4696, should be fixed in our next deploy.
@stsewd I don’t think this is a duplicate issue as this bug is appearing in sphinx based projects too. In the #4482 the value for
conf_py_path
is changed from a relative to an absolute path. This is passed to the sphinx build context and then used in the readthedocs default theme to generate the “Edit on [VCS]” link. This is also documented in: https://docs.readthedocs.io/en/latest/vcs.html?highlight=conf_py_path Maybe you need an absolute path here, but we also need to provide a relative path in the checkout to the docs root in order to generate a correct “Edit on [VCS]” link.🎉 thanks for the quick fix 👏
It works fine now! Thanks a lot!
@stsewd that’s not my project, I just noticed the same bug in a sphinx based project and commented this same issue instead of opening a new one. Thanks for your commitment.