Merged
Conversation
Includes new configuration option `git-repository-edit-baseurl` for supporting non-GitHub repository layouts.
…dependent of git_repository_url.
The `IndexPreprocessor` rewrites the path for files named `README.md` to be `index.md`. This breaks the edit link in some circumstances. To address this issues, the `Chapter` struct has now a new attribute called `source_path`. This is initialized with the same value as `path`, but is never ever changed. Finally, the edit link is built by using the `source_path` rather than the `path`.
Add a working example of the edit links feature to the examples
Add "edit" links to the pages of mdbook own book
Contributor
Author
|
ping @ehuss: this is the updated PR for the edit links feature |
Contributor
|
Thanks for picking this up! I was thinking, since this isn't related to git in any way, perhaps the field could be called Otherwise looks good to me! |
Change the name of the git-repository-edit-url-template to be more generic: `edit-url-template` Signed-off-by: Flavio Castelli <fcastelli@suse.com>
Contributor
Author
|
@ehuss: sure, that's fine with me. I updated the PR to reflect your suggestion. Let me know if you want me to squash the last commit with the previous one. |
ericonr
added a commit
to ericonr/void-docs
that referenced
this pull request
May 25, 2021
Need to filter what we actually need from this file, but it includes accessibility and navigation fixes, plus the additions necessary for edit-url-template [1] to work. [1] rust-lang/mdBook#1506
This was referenced Sep 8, 2021
shawn111
added a commit
to shawn111/dotfiles
that referenced
this pull request
Feb 18, 2024
improve github-page intergration rust-lang/mdBook#1506
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.
This PR is based on #1148 and supersedes it.
Compared to the originating PR, this one rebases the code against the current
masterbranch and, most important of all, fixes the broken links reported by the early testers of this feature. I'm referring to the broken links to pages that were namedREADME.md.I've successfully tested this feature against a complex mdbook hosted on GitHub, Bitbucket and Gitea