-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add an "Edit this page" button #326
Comments
Just wanted to say this is one of my favorite features of jupyterbook! I regularly point it out during xarray tutorials (https://tutorial.xarray.dev/intro.html) and it's a wonderful way to get small contributions from the community like clarifying wording or fixing typos. So just wanted to add a +1 to make sure this is part of jupyterbook v2 :) |
I think of this feature as critical for documentation sites where readers may not be comfortable with git or navigating the file structure, but may be able to offer considerable value by fixing a mistake or updating out-of-date information as they continue to use the docs years after they were written. The GitHub user experience for this has gotten REALLY good. I think about 2 years ago there was an overhaul... now, even if a fork needs to be created it's really close to seamless. |
@fwkoch is planning to tackle this in the next week! |
@rowanc1 I'm curious what you think about using a similar UX for this that we have with launch buttons. AKA having a tabbed drop-down that you can use to bring up multiple types of editing environments (eg in case there are multiple ways a user might want to edit the page, like GitHub normal UI vs GitHub codespaces). Is that overkill? |
First cut I think we just stay simple and ensure we are tracking pages relative to the git route, then the theme can be in charge of the feature you are describing. The new development necessary for mystmd is to have the source directory and file information (currently it is relative to the myst.yml route). Can always improve in the next iteration! |
That makes sense to me - one thing that was always annoying with the sphinx stack was that some of the logic you'd want theme agnostic was wrapped up in the book theme only. For example, creating the link for binder in a reliable and accessible way, and then exposing that as a variable for any theme to use. In jb1 the binder logic was tied to the theme, so every other theme would have to implement it's own link generation logic I'm not sure if that is too much on the theme side or not but just sharing the thought in case it is helpful |
First part is completed here:
|
Context
When using MyST for knowledge repositories or documentation, it is useful to be able to quickly view the source files for the documentation, and to suggest an edit with as little friction as possible. Right now, doing so requires figuring out the github repository and the location of the source file manually.
Proposal
Add an "Edit this page" or "Suggest an edit" button that provides a link to "suggest an edit" in the version control system of choice for the MyST site.
Tasks and updates
The text was updated successfully, but these errors were encountered: