-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Is there a way to change the edit branch away from master? #2416
Comments
If you use a non-standard (mind the time of release) default branch on Github, you can not rely on the "few known hosts (specifically GitHub, Bitbucket and GitLab) [that] the edit_uri is derived from the 'repo_url'" (ref) and you have to set the This is also true if you use a non-standard "docs" directory.
(Example: non-standard documentation root in a Github repository, docs folder is project root and default branch is master) Feel free to adopt the values according to your repository, the (comment against mkdocs 1.1.2) |
That answer is correct. edit_uri: blob/master/docs/ and indeed you can set any other branch than |
Add information about where the documentation is hosted, and how one can contribute to it. Since Mkdocs presently assumes that the default branch in a repo is always named "master" and we're using main, set edit_uri to the correct path for the main branch. Reference: mkdocs/mkdocs#2416
I apologize if I missed something in the documentation but when I select the pen to edit my page, it always tries to bring me to the "master" branch (which does not exist as we only have a main branch) which leads us to a GitHub 404 error page. Did I miss something here or has this not been addressed yet? Thanks!
The text was updated successfully, but these errors were encountered: