[docs]: fix the edit page buttton link in docs by Mr-Sunglasses · Pull Request #17933 · python/mypy (original) (raw)

@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.