diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 8a33f0ae..116a692b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -35,7 +35,14 @@ jobs: - name: Build with Jekyll run: bundle exec jekyll build working-directory: ./docs - - name: Run HTML Proofer - run: bundle exec htmlproofer ./_site --disable-external --no-enforce-https - # --log-level :debug - working-directory: ./docs \ No newline at end of file + - name: Run Lychee + uses: lycheeverse/lychee-action@v2 + with: + args: >- + --offline --include-fragments + --fallback-extensions html + --index-files 'index.html,.' + --root-dir ${{ github.workspace }}/docs/_site + ./_site + workingDirectory: ./docs + fail: true \ No newline at end of file diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml index 93be48c4..d8cf45dc 100644 --- a/.github/workflows/jekyll-gh-pages.yml +++ b/.github/workflows/jekyll-gh-pages.yml @@ -49,10 +49,22 @@ jobs: env: JEKYLL_ENV: production PAGES_REPO_NWO: "${{ github.repository }}" - - name: Run HTML Proofer - run: bundle exec htmlproofer ./_site --disable-external --swap-urls "^${{ steps.pages.outputs.base_path }}/:/" - # --log-level :debug - working-directory: ./docs + - name: Run Lychee + uses: lycheeverse/lychee-action@v2 + with: + # --remap matches the fully-resolved file URI (not the raw href), so the pattern + # must include the file:// scheme and --root-dir prefix. The (/|$) tail handles + # both `/twinBASIC-docs/page` and bare `/twinBASIC-docs` — lychee strips trailing + # slashes before remap, so we can't require one in the pattern. + args: >- + --offline --include-fragments + --fallback-extensions html + --index-files 'index.html,.' + --remap '^file://${{ github.workspace }}/docs/_site${{ steps.pages.outputs.base_path }}(/|$) file://${{ github.workspace }}/docs/_site/' + --root-dir ${{ github.workspace }}/docs/_site + ./_site + workingDirectory: ./docs + fail: true - name: Upload artifact uses: actions/upload-pages-artifact@v5 with: diff --git a/docs/check.bat b/docs/check.bat index 3c47b21e..76712b56 100644 --- a/docs/check.bat +++ b/docs/check.bat @@ -1,2 +1,2 @@ -@rem Use htmlproofer to check the links in the site -bundle exec htmlproofer ./_site --disable-external --no-enforce-https +@rem Use lychee to check the links in the site +@"%~dp0..\.claude\lychee.exe" --offline --include-fragments --fallback-extensions html --index-files "index.html,." --root-dir ".\_site" ".\_site" %* \ No newline at end of file