Skip to content

Commit 0402d9f

Browse files
authored
Merge pull request #147 from KubaO/staging
Link-check the book html.
2 parents d2b818a + 1c6fc77 commit 0402d9f

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/checks.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,15 @@ jobs:
6969
# /tB/... permalink that resolves locally. The bare root URL
7070
# (https://docs.twinbasic.com[/]) is exempt -- intentional "go to
7171
# the live site" links are allowed.
72-
run: python scripts/check_offline_live_links.py
72+
run: python scripts/check_offline_live_links.py
73+
- name: Check book links (informational)
74+
# Failures do not block the build. The book still has absolute
75+
# intra-site URLs that the chapter transform has not yet rewritten
76+
# and some fragment anchors that are not yet generated. Tracked here
77+
# for visibility until those are fixed.
78+
continue-on-error: true
79+
run: >-
80+
python scripts/check_links.py
81+
--offline --include-fragments
82+
--root-dir docs/_site-pdf
83+
docs/_site-pdf/book.html

.github/workflows/jekyll-gh-pages.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ jobs:
102102
# (https://docs.twinbasic.com[/]) is exempt -- intentional "go to
103103
# the live site" links are allowed.
104104
run: python scripts/check_offline_live_links.py
105+
- name: Check book links (informational)
106+
# Failures do not block the build. The book still has absolute
107+
# intra-site URLs that the chapter transform has not yet rewritten
108+
# and some fragment anchors that are not yet generated. Tracked here
109+
# for visibility until those are fixed.
110+
continue-on-error: true
111+
run: >-
112+
python scripts/check_links.py
113+
--offline --include-fragments
114+
--root-dir docs/_site-pdf
115+
docs/_site-pdf/book.html
105116
- name: Upload Pages artifact
106117
uses: actions/upload-pages-artifact@v5
107118
with:

docs/check.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@
4646
@echo Checking _site-offline/ for live-site links ...
4747
@python "%~dp0..\scripts\check_offline_live_links.py"
4848
@set EXIT3=%ERRORLEVEL%
49+
@echo.
50+
@echo Checking _site-pdf/book.html (informational -- failures do not block) ...
51+
@rem Links in the book are not fully resolved (absolute intra-site URLs stay live
52+
@rem until the book chapter transform rewrites them, and some fragments are still
53+
@rem missing). Run for visibility; exit code is intentionally not propagated.
54+
@%CHECK% --offline --include-fragments --root-dir ".\_site-pdf" ".\_site-pdf\book.html" %*
55+
@echo.
4956
@if %EXIT1% NEQ 0 exit /b %EXIT1%
5057
@if %EXIT2% NEQ 0 exit /b %EXIT2%
5158
@exit /b %EXIT3%

0 commit comments

Comments
 (0)