Fix link checker accepted status codes and base URL#736
Open
Zhengyizhe0209-arch wants to merge 1 commit into
Open
Fix link checker accepted status codes and base URL#736Zhengyizhe0209-arch wants to merge 1 commit into
Zhengyizhe0209-arch wants to merge 1 commit 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.