Fix link checker accepted status codes and base URL#736
Fix link checker accepted status codes and base URL#736Zhengyizhe0209-arch wants to merge 2 commits into
Conversation
Accept normal 2xx responses and resolve root-relative links against the deployed site.
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR updates the scheduled link-checking workflow configuration to (1) treat normal successful HTTP responses as acceptable and (2) correctly resolve root-relative links found in locally checked HTML files by providing a deployment base URL.
Changes:
- Expand accepted HTTP status codes to include
200..=299(while keeping403and503). - Add
--base-url https://intro.quantecon.orgso root-relative links (e.g.,/_pdf/...) can be resolved during checks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for the contribution, @Zhengyizhe0209-arch! 👋 I had a look and this is a real fix, not a workaround:
LGTM 👍 — happy to merge. The next scheduled run (or a manual |
Summary
This pull request updates the link checker configuration used by the scheduled workflow.
In issue #734, many successful
200 OKresponses are reported as rejected status codes. This appears to be related to the current--accept 403,503setting, which is too restrictive for normal successful HTTP responses.The report also includes errors for root-relative links such as
/_notebooks/...and/_pdf/..., which cannot be converted into URLs when checking local HTML files. This PR adds a base URL so that these links can be resolved against the deployed site.Changes
200..=299.403and503status codes.--base-url https://intro.quantecon.orgto resolve root-relative links.Addresses #734.