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] Use htmltest for link checking #310

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

chalin
Copy link
Collaborator

@chalin chalin commented Mar 19, 2025

Link checking (proper) the site now takes less than 1 second. The workflow takes 1 minute, but that's the time required to set up and build the site.

@chalin chalin added the CI/infra CI & infrastructure label Mar 19, 2025
Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for cncf-techdocs ready!

Name Link
🔨 Latest commit dddf6d1
🔍 Latest deploy log https://app.netlify.com/sites/cncf-techdocs/deploys/67dafad49fec660008b89f10
😎 Deploy Preview https://deploy-preview-310--cncf-techdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file for? Do we need it or can we add it to the .gitignore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the external link reference cache. External links are checked against the refcache rather than fetching them on each run. It makes link checking more stable and more efficient. This is why the link-checking proper takes less than 100 milliseconds on my machine. Of course it means that we need to update the cache now and again, but it is worth it (IMHO).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, but I think i'd rather separate this into a different folder then. /static is part of the site being built, where as this refcache is a part of the build tooling, and doesn't need to be published.

Signed-off-by: Patrice Chalin <pchalin@gmail.com>
@chalin chalin force-pushed the chalin-im-link-checking-2025-03-19 branch from f4494c4 to dddf6d1 Compare March 19, 2025 17:11
@chalin chalin merged commit c6cb637 into cncf:main Mar 19, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/infra CI & infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] Use htmltest for link checking of site pages Link checking: implement a simple caching strategy
2 participants