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

[CI] Check relative links are correct #162

Open
ee7 opened this issue Jun 25, 2021 · 5 comments
Open

[CI] Check relative links are correct #162

ee7 opened this issue Jun 25, 2021 · 5 comments

Comments

@ee7
Copy link
Member

ee7 commented Jun 25, 2021

Not a priority for now, but it would be nice to have a script that does something like:

  • For every markdown file:
    • For every link:
      • If it's a relative link:
        • Check that it resolves to a file in this repo, using the logic that the website uses (no .md extension, etc)
        • Bonus: check that any anchor is correct too
@SaschaMann
Copy link
Contributor

Could probably use Erik's link check tool for this again: https://github.com/exercism/v3/blob/main/.github/workflows/valid-links.yml

@ErikSchierboom
Copy link
Member

I've recently found lychee: https://github.com/lycheeverse/lychee This tool is much more full-featured than my tool and a lot faster (it's built in Rust).

@iHiD
Copy link
Member

iHiD commented Aug 24, 2021

Nice. The challenge here is probably the fact that relative links are relative in the context of the website; the therefore the race-condition of new links being added but not merged, so not appearing in the website.

I feel like we probably need to build out the array of all routes from the config.jsons, and then check against that?

@ErikSchierboom
Copy link
Member

Yeah, I think that's probably best

@ee7
Copy link
Member Author

ee7 commented Nov 30, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants