-
Notifications
You must be signed in to change notification settings - Fork 82
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
docs: add lychee github action for test purposes #839
Conversation
Context for other reviewers:
Proposed solution:
|
|
Check out my PR which uses the built website version for the link checking. There are still some quirks to figure out, but there's probably less of them than here. Feel free to merge that branch in here and close it... or whatever :) |
When you look at the single documentation page, it contains many more links than the original markdown document - navigation bars, The |
Ah yes, fair enough the point about lychee now checking also navbars and other clickable content makes perfect sense.
|
One other thing to consider is that it seems that we have a lot of false positives in the lychee report since a lot of our links are linking to |
How is that relevant? The relative paths are transformed to actual links on build time, lychee won't test those but the actual rendered links, right? Sounds like a misconfiguration to me. |
I think this boils down to which approach we choose:
|
Keep in mind docusaurus is already checking those links. A relative path link is always pointing to something local which is exactly the thing that docusaurus verifies (and breaks the CI checks if it fails)
I disagree this is "something to fix", the links are not broken. |
Found this example repo: https://github.com/StarRocks/docusaurus-build Which explicitly skips the links pointing to
(we should skip both |
Fix was in a sense that it does throw false positives. I don't think |
Those links are never "relative file links", they cannot be, such links can only point to the local files in the specific docusaurus project. |
I think there might have been some misunderstanding regarding the approach to link checking with Lychee. We're dealing with three types of links in our documentation:
The challenge arises with how Lychee handles the first type of links when the We've identified two potential solutions:
|
I don't think this is about misunderstanding, more like I don't like what you are saying and I have a hard time believing there isn't a better way that does not involve rewriting the content :]
Yes, and the solution to this is to skip those from lychee, it feels like you don't want to do that, but it is the correct fix.
Not necessarily, they can point to the same docusaurus instance as well, but yes.
Ignore rules that need to be applied to the source, not to post-processed URLs (so this needs to ignore anything, including the Maybe the Changing the URLs would be a step back to me - the paths are pretty handy, as they decouple the content from the URL, and they provide intellisense/autocomplete too. |
From a glance into the Lychee source code, it's not really equipped for checking for local files - the only notion of a local file is the Aside from skipping the GitHub 429s on the edit pages, what other issues are there with checking the built website version? Imo having Lychee check the built, properly formed HTML links solves all our issues just like that. Being able to check both external and internal links is also a plus for me, as that PR of mine already found at least two issues, like linking https://pptr.dev/docs/puppeteer.page.evaluateonnewdocument and https://docs.apify.com/api/v2/ (with trailing slash), which both return 404. |
Doesn't docs.apify.com/api/v2 always return |
edit: this is rather general issue, its not just about this page - its a client side app, docusaurus does not handle server side routing, so its capability of detecting what is actually missing is a bit weak. we have the exact same problem on every page, if you add the trailing slash, you get 404 in the server response (but things get properly hydrated client side). |
Since we are moving forward with #855 I'll go ahead and close this PR |
No description provided.