-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add "Suggest an edit" link next to "Git repository" #1148
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
Conversation
Includes new configuration option `git-repository-edit-baseurl` for supporting non-GitHub repository layouts.
2f99a45 to
cf4cb53
Compare
|
I would prefer if this wasn't enabled by default. Also, the default of I also don't quite see the point of a "suggest an edit" link that just takes you to the source browser. It seems to be very similar to the existing git repo link. I wonder if using a github |
|
Well the repository link already defaulted to the github icon, so I thought assuming github was ok. But you have valid point. I think it is good to have a direct link to the chapter being viewed, so the random reader won't have to figure out the repo directory structure and file naming conventions to contribute. I'm perfectly fine with changing the link to point to the edit page directly. Otoh if we won't assume github, which means the user always has to enter the edit baseurl separately, we won't be assuming anything about the url anyway so it's just up to documentation to give good examples? |
|
Bitbucket format for edit urls is |
|
Making |
|
Having a separate setting for editing chapters/pages that solely controls the visibility of the "edit" icon would let the owners decide whether they want repo link, a direct edit link, or both.. WDYT? Will try to get this done soon, this is my first day coding rust after all :) |
…dependent of git_repository_url.
80e1f4c to
033d04f
Compare
|
The index pages seem to be broken. For example, in the book-example adding: git-repository-edit-url-template = "https://github.com/rust-lang/mdBook/edit/master/book-example/{path}"the front page tries to load index.md instead of README.md. Same with if you go to |
|
Good catch, I will investigate when I can! |
|
Any idea when this is going to get merged? |
The exact url you can put in the |
I'm interested in this PR too. I see the PR got 1 approval, is that just a matter of doing a rebase and solving the conflicts? I would be happy to help with that if that's the case |
|
@flavio it looks like there were still some issues with index handling. If you want to take it and try to fix that, I think that would be fine since it has been over a year since we last heard from the author. |
|
This has been merged as #1506. |
Includes new configuration option
git-repository-edit-baseurlforsupporting non-GitHub repository layouts.