From 1c6fc77f79be31be43f3332a0ed1f21738852cc4 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Wed, 20 May 2026 16:13:50 +0200 Subject: [PATCH] Link-check the book html. --- .github/workflows/checks.yml | 13 ++++++++++++- .github/workflows/jekyll-gh-pages.yml | 11 +++++++++++ docs/check.bat | 7 +++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 5a2d0b7f..a6fca2e8 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -69,4 +69,15 @@ jobs: # /tB/... permalink that resolves locally. The bare root URL # (https://docs.twinbasic.com[/]) is exempt -- intentional "go to # the live site" links are allowed. - run: python scripts/check_offline_live_links.py \ No newline at end of file + run: python scripts/check_offline_live_links.py + - name: Check book links (informational) + # Failures do not block the build. The book still has absolute + # intra-site URLs that the chapter transform has not yet rewritten + # and some fragment anchors that are not yet generated. Tracked here + # for visibility until those are fixed. + continue-on-error: true + run: >- + python scripts/check_links.py + --offline --include-fragments + --root-dir docs/_site-pdf + docs/_site-pdf/book.html \ No newline at end of file diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml index 14715878..9b2f201c 100644 --- a/.github/workflows/jekyll-gh-pages.yml +++ b/.github/workflows/jekyll-gh-pages.yml @@ -102,6 +102,17 @@ jobs: # (https://docs.twinbasic.com[/]) is exempt -- intentional "go to # the live site" links are allowed. run: python scripts/check_offline_live_links.py + - name: Check book links (informational) + # Failures do not block the build. The book still has absolute + # intra-site URLs that the chapter transform has not yet rewritten + # and some fragment anchors that are not yet generated. Tracked here + # for visibility until those are fixed. + continue-on-error: true + run: >- + python scripts/check_links.py + --offline --include-fragments + --root-dir docs/_site-pdf + docs/_site-pdf/book.html - name: Upload Pages artifact uses: actions/upload-pages-artifact@v5 with: diff --git a/docs/check.bat b/docs/check.bat index 094bbce5..78e080ef 100644 --- a/docs/check.bat +++ b/docs/check.bat @@ -46,6 +46,13 @@ @echo Checking _site-offline/ for live-site links ... @python "%~dp0..\scripts\check_offline_live_links.py" @set EXIT3=%ERRORLEVEL% +@echo. +@echo Checking _site-pdf/book.html (informational -- failures do not block) ... +@rem Links in the book are not fully resolved (absolute intra-site URLs stay live +@rem until the book chapter transform rewrites them, and some fragments are still +@rem missing). Run for visibility; exit code is intentionally not propagated. +@%CHECK% --offline --include-fragments --root-dir ".\_site-pdf" ".\_site-pdf\book.html" %* +@echo. @if %EXIT1% NEQ 0 exit /b %EXIT1% @if %EXIT2% NEQ 0 exit /b %EXIT2% @exit /b %EXIT3%