-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Set edit_uri
option on Mkdocs projects for better integration
#4827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That one was because of an old build I believe, we should just retrigger a new build on the stable docs. |
A new build was triggered on the stable version of rtd, the url is correct now |
I'll investigate about the mkdocs issue, not sure where the link is injected |
We don't do anything with that, putting master is the default behavior from mkdocs https://www.mkdocs.org/user-guide/configuration/#edit_uri (read the note). But I think this would be a nice to have for the mkdocs integration, similar to #4820 |
Thanks for the super quick analysis! Now as I read that (again) I remember it to be vaguely familiar. Conclusion is that I could potentially fix that myself (by editing So yes, support from RTD in an integration task would be greatly appreciated. Otherwise, I'd have to resort to a JavaScript hack fixing the link URL on page load in the browser. |
So, I have brought this to the team, I'd say we don't have a final decision yet, our main concern is that the mkdocs.yml could change that options, and we don't have a way to identify the mkdocs version that the users are running, so things can break. I'm changing the title to reflect the request and adding the design decision label. |
edit_uri
option on Mkdocs projects for better integration
|
We are moving away of "magically" do things on behalf of the user for particular doctools. We are now going to expose some extra environment variables that doctool/theme authors could use to integrate properly with us. See #9423 |
I'm closing this issue since we don't plan to add more "magic manipulation" on our build process --in fact, we are removing as much as we can from it. The user should the environment variables passed to the build process https://docs.readthedocs.io/en/stable/reference/environment-variables.html#envvar-READTHEDOCS_GIT_CLONE_URL to define |
Details
Expected Result
The "Edit on GitHub" top right should take you to the page on GitHub on the selected branch and open it for editing (requires GH authentication).
Actual Result
For MkDocs projects
Regardless of which branch you selected it always links to the
master
branch - which might not even have that page. Examples:dev
branch rather thanmaster
For RTD itself
As far as I can tell there's only a problem with the "stable" alias. However, that might be because there are only stable and latest.
Side note
Similar issues have existed for the "branch selector" for quite some time (fly-out or dropdown bottom right) but there are other issues for that AFAIR.
The text was updated successfully, but these errors were encountered: