Skip to content
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

[docs]: fix the edit page buttton link in docs #17933

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

Mr-Sunglasses
Copy link
Contributor

(Explain how this PR changes mypy.)

fix: #17870

Issue

The current docs edit the page button gives a 404.

What changes this PR does

This PR edits the sphinx config.py and configures the edit button url to the master branch of this repository.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I couldn't find a reference for these options. Is there one?

@Mr-Sunglasses
Copy link
Contributor Author

Mr-Sunglasses commented Oct 14, 2024

Hm, I couldn't find a reference for these options. Is there one?

Yeah, I take the reference from cpython devguide repo here and the docs for the furo theme here

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and the link! :-)

@hauntsaninja hauntsaninja merged commit 80b5913 into python:master Oct 14, 2024
2 checks passed
@Mr-Sunglasses
Copy link
Contributor Author

Mr-Sunglasses commented Oct 14, 2024

@hauntsaninja Quick question about how the docs are currently working after the recent PR merge. The current behavior of the docs site is as follows:

When we view the latest branch, the "Edit" button is visible. This happens because Sphinx uses the GitHub repository link combined with the branch name to allow editing the specific source file of the documentation.

Screenshot 2024-10-15 at 2 24 58 AM

However, when we switch to the stable branch, the "Edit" button disappears. This is expected behavior with Sphinx since the stable docs are released using tags, and tagged releases aren't associated with branches that can be directly edited.

Screenshot 2024-10-15 at 2 25 06 AM
Screenshot 2024-10-15 at 2 53 42 AM

IMO, we need to further discuss whether this is the behavior we want or if we need to consider changing how we deploy our docs.

@hauntsaninja
Copy link
Collaborator

Feel free to open an issue or more PRs if you have some improvements you'd like to make! :-)
I'm not particularly knowledgeable about sphinx / rtd, so don't have any opinions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An edit button in docs does not work (gives 404)
2 participants