Fix broken links on ruby.github.io/rake home page #509
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.
The homepage for Rake (https://ruby.github.io/rake/) has 4 broken links in the Rake Information section. Clicking them takes the user to a 404 page. The links point to
.rdoc
files that are transformed to_rdoc.html
in the generated site. The links reference the original.rdoc
names, so they don't work.The links work when rendered on GitHub, however.
Ultimately the problem is that GitHub and rdoc generate these links differently. If the link is declared with the
link:
prefix (as they currently are), they work on GitHub, but break in the rendered rdoc site. On the other hand, if thelink:
prefix is removed, they work in the rdoc site but break on GitHub.This commit applies a workaround to fix this. The source files are unchanged, but an additional build step has been added to the
rdoc
Rake task: after the site is generated, the broken links are detected and rewritten to have the correct names.Because the source files have not been changed, the GitHub rendering will continue to work. This commit only affects the generated rdoc output, in order to fix the links.