Add "Edit on Github" to secondary sidebar#982
Merged
TimMonko merged 3 commits intonapari:mainfrom Apr 9, 2026
Merged
Conversation
Contributor
|
Can it also be renamed to "propose an edit" or something like that? Might be less intimidating, as "edit on github" might sound like it's off-limits to the casual visitor. |
Contributor
Author
|
Hmm, at first my counter argument was that this language is "standardized", but I think you are on to something. To do this, it does require a customized html template. If I do this I will add it to napari-sphinx-theme, so all repos benefit. So, in that sense this PR can be merged and then the upstream napari-sphinx-theme will override it later. |
willingc
approved these changes
Apr 9, 2026
Contributor
Author
|
We collectively decided at the docs meeting, that it should remain "Edit on Github" since that is a standard. @brisvag if you feel strongly you can open an issue in napari-sphinx-theme ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References and relevant issues
xref napari/napari-sphinx-theme#216
Description
This adds an "Edit this Page" button to the secondary (right) sidebar on our docs.
Minimal setup was done via here: https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/source-buttons.html
And
edit_page_url_templatepoints not to theeditURL but instead toblob. I noticed from pydantic sphinx theme that clicking through leads me to the "You need to fork this" and not a nice clean document. I think being met with the fork screen would be a WTF moment as a new contributor, so I'd prefer something more welcoming (and where you can actually see the code right away)Also ran into #981 while developing