diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 1c9afee00..6e447db95 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -24,7 +24,31 @@ jobs: # --root-dir resolves root-relative links (e.g. /_notebooks/*.ipynb, # /_pdf/quantecon-python.pdf) against the gh-pages checkout so they are # not reported as errors. See QuantEcon/lecture-python.myst#906. - args: --root-dir ${{ github.workspace }} --accept 200,403,503 *.html + # + # The flags below clear the residual false positives reported in + # QuantEcon/lecture-python.myst#933. Configuration is kept inline (rather + # than a lychee.toml) because lychee runs against the gh-pages checkout, + # which does not contain repo-root config files. + # --accept 202 IEEE Xplore returns "202 Accepted" (anti-bot) for + # valid links, e.g. doi.org/10.1109/TAC.1977.1101561 + # --exclude-path ... genindex / search / prf-prf are auto-generated + # utility pages with no source notebook, so the + # theme's "Download Notebook" button points at a + # nonexistent _notebooks/.ipynb (and renders a + # second button with href="None"). They carry no + # unique content links, so skipping them loses no + # coverage. + # --exclude Journal of Derivatives DOI redirects into a + # login/paywall loop (exceeds max-redirects); the + # citation itself is valid. + args: >- + --root-dir ${{ github.workspace }} + --accept 200,202,403,503 + --exclude-path 'genindex\.html$' + --exclude-path 'search\.html$' + --exclude-path 'prf-prf\.html$' + --exclude '10\.3905/jod\.2012\.20\.1\.038' + *.html - name: Create Issue From File if: steps.lychee.outputs.exit_code != 0 uses: peter-evans/create-issue-from-file@v6