Skip to content
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

Fix broken links on ruby.github.io/rake home page #509

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 16, 2023

  1. Fix broken links on rdoc index page

    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 the `link:` 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.
    mattbrictson committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    c2d0aa8 View commit details
    Browse the repository at this point in the history