Reduce link checker noise and fix broken DOI (#906)#915
Merged
Conversation
The weekly link checker report (#906) flagged 241 "errors", but ~237 were noise: - ~234 root-relative links (/_notebooks/*.ipynb and /_pdf/quantecon-python.pdf, two per lecture page) that lychee could not resolve because no root directory was provided. These files do exist in the gh-pages build. Pass --root-dir so they resolve to the checkout instead of erroring. - The remaining external "errors" were false positives (HEAD/accept handling, a transient network failure, and a paywalled DOI redirect). The one genuine issue was the GrossmanStiglitz1980 bib entry, whose DOI 10.2307/1805228 is unregistered at doi.org (real 404). There is no registered replacement DOI for the original 1980 AER article, so drop the doi field; the citation remains complete. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Reduces noise in the weekly Lychee link-check workflow (so root-relative links in the built site resolve locally) and removes a broken DOI from the project bibliography to eliminate a genuine external 404.
Changes:
- Update the link checker workflow to pass
--root-dir ${{ github.workspace }}so root-relative links like/_notebooks/...and/_pdf/...resolve against thegh-pagescheckout. - Remove the unregistered/broken DOI (
10.2307/1805228) from theGrossmanStiglitz1980BibTeX entry.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/linkcheck.yml |
Adds --root-dir to Lychee args to resolve root-relative links locally and reduce false-positive failures. |
lectures/_static/quant-econ.bib |
Removes a broken DOI field from a bibliography entry to prevent link-check 404s while keeping the citation complete. |
📖 Netlify Preview Ready!Preview URL: https://pr-915--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
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
Triage of the weekly link checker report (#906). It reported 241 errors, but ~237 were noise from how lychee is invoked. This PR removes that noise and fixes the one genuine issue.
Breakdown of #906
/_notebooks/*.ipynb+/_pdf/quantecon-python.pdf(2 per lecture page)file://…/Noneartifacts on generated pages (genindex,prf-prf,search)two_auctions/zreferencesI verified the four external links with live requests:
chekuri.cs.illinois.edu/.../Notes20.pdf→ 200 (the415was HEAD/accept-header handling)s2.smu.edu/tsalmon/auctions.pdf→ 200 (the network error was transient in CI)doi.org/10.3905/jod.2012.20.1.038→ valid DOI, just 302s into a paywalled logindoi.org/10.2307/1805228→ genuine 404 — unregistered at doi.orgChanges
1.
linkcheck.yml— pass--root-dir. Lychee runs against thegh-pagescheckout with no root directory, so every root-relative link (/_notebooks/…,/_pdf/…) errors with "To resolve root-relative links in local files, provide a root dir". Those files exist in the build;--root-dir ${{ github.workspace }}resolves them locally, eliminating ~234 of the 241 errors and leaving future reports as signal.2.
quant-econ.bib— drop the broken DOI. TheGrossmanStiglitz1980entry's DOI10.2307/1805228is unregistered (real 404). Crossref has no registered DOI for the original 1980 AER article, so thedoifield is removed; the citation (author/title/journal/year/vol/pages) remains complete.Note on
QuantEcon/actionsI also checked whether the shared linkchecker in
QuantEcon/actionsis ready to migrate to — it is not built yet. It exists only as a proposal indocs/FUTURE-DEVELOPMENT.mdand is marked "out of scope (standalone)" inPLAN.md. When that wrapper is built, it should bake in--root-dir/base-URL handling and exclusion patterns so this noise does not recur.🤖 Generated with Claude Code