-
Notifications
You must be signed in to change notification settings - Fork 0
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
Migrate html-proofer
-> lychee
, only check internal links
#108
Comments
If this can work it would be good, more alignment between local tests and CI. Somethings I'm not sure about,
|
🤨 That is true. It doesn't check for missing anchors (e.g. In which case, the task reduces to making sure that all internal links are specified using either ref or relref. (Do you know if one of these is better than the other?) In any case, that should be easy enough to do as it'd just be a simple bash script grepping the markdown source code for |
Oh, that is interesting. I assumed that would be checked.
That would be good. Might need to check for Markdown style links If you do something like that, it would also be appreciated in The Turing Way. |
In principle you should be able to check anchors. (for example, I think Sphinx does this) There are a couple of ways I guess — one would be checking the generated HTML, to ensure that a HTML element on the given page with the given id exists. However, making this robust might be a bit difficult, as just grepping for I suspect it might be easier to check anchors on the Markdown itself. This would rely on knowledge of which HTML anchors are generated from Markdown (and how), i.e. |
Problem
Checking the validity of external links is fragile, and many of the external links require authentication anyway, meaning that it is not possible to meaningfully check their validity.
lychee
also seems like an improvement overhtml-proofer
, which we currently use in CI.Proposed steps to solve
html-proofer
withlychee
in CI. (There is an action available here)lychee
to include one, as the developers seem quite open to this sort of enhancement.pre-commit
says that it will bootstrap rust if it's not already installed, so people editing the handbook should not need to separately install rust. (a plus!)html-proofer
doesn't have a pre-commit hook either, so we are not losing anything by switching.@JimMadge I think I have some extra time these couple of weeks, so could start looking into it. Edits etc welcome.
The text was updated successfully, but these errors were encountered: