-
Notifications
You must be signed in to change notification settings - Fork 100
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
Check that links work before deploying #538
Comments
Even if we run a link check, our links will return 404 pages. Should these be considered broken links, or is it acceptable since they return some HTML content? And it would be better to run a link check directly on our Quarto markdown pages, so we don’t have to wait for the full site to render just to get link check approval. |
I totally agree about running it on the Quarto docs being preferable, but I'm just not sure about it from a practical point of view -- do we have something that is capable of checking relative links between documents? I do think we could put something together to do that, but I'm not sure it's really worth the time. I don't immediately see how we would get 404s! Could you explain? |
@penelopeysm #530 (comment) I raised this discussion earlier on #530 maybe this is possible if we think of it. I agree this may take an extra overhead but it may solve the issue |
@beingPro007, feel free to open a PR. I'll mention quickly that the workflow you suggested in
|
I am also not sure of this!
I do not know how link checker's work, I am just guessing that they search the link using something and if they do not get any HTML content from it then the particular link is considered broken, so in our case if a broken link is search then it will return html content of 404 error page like this one: https://turinglang.org/broken |
IMO, it will be much better to make a reusable workflow that checks links in a html, md, mdx, other markup language's...! |
It's true that you will still get HTML contents, but the response code will still be a 404 and that should track as a failure:
|
I wasn't aware of it, thanks for clarification! |
I’ve been experimenting with some link checkers, and while it’s straightforward to run them on our generated HTML, it might not be the best approach for us as developers. I found
|
I think that's pretty much what I meant when I said I wasn't sure whether it was worth our time.
|
Since our internal links now all use meta variables, I'm not sure if there's any software out there that can check link validity at the source code stage. (We could probably write one, but that feels a bit excessive)
So instead we should probably run some sort of HTML link checker on the Quarto output itself, perhaps https://github.com/filiph/linkcheck
The text was updated successfully, but these errors were encountered: