Skip to content

View source and Edit this page using 'master' instead of 'main' #7810

Answered by niclasheinz
golfecholima asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the clarification.

You can simple add this to your mkdocs.yml configuration:

edit_uri: -/edit/main/docs/

then you get the right url points to branch main for both edit and view source

Link to documentation: https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/?h=edit+uri#code-actions

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@golfecholima
Comment options

@niclasheinz
Comment options

Answer selected by golfecholima
@golfecholima
Comment options

@kamilkrzyskow
Comment options

@golfecholima
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants