Skip to content

fix(404): resolve the 404 page from the site root, and bound the weekly crawl - #167

Merged
srpatcha merged 1 commit into
embeddedos-org:masterfrom
Kartikey1306:fix/404-base-href
Oct 8, 2026
Merged

srpatcha merged 1 commit into
embeddedos-org:masterfrom
Kartikey1306:fix/404-base-href

Conversation

@Kartikey1306

Copy link
Copy Markdown
Contributor

Closes #166

Changes

File Change
404.html Adds <base href="/"> after the charset, so its relative style.css, index.html, docs/… and the rest resolve from the site root at any missing path. The page's CSP already has base-uri 'self'.
.github/workflows/health-check.yml timeout-minutes: 45 on the crawl job, so a future hang fails visibly instead of being silently cancelled at 6 h.
tests/not-found.spec.js (new) Loads a nested missing path (/no/such/page/). Requires a 404 status, no failed same-origin request, and no internal link under that path.

Verification

Measured at f70dea7.

1. The crawl itself. linkinator 6 with the job's flags, starting at the missing path /eVera/. The repo was served by a small local server that answers unknown paths with 404.html and status 404, as GitHub Pages does.

Links checked 404s Deepest path Outcome
Current 404.html 38,962 38,959 18 levels still running when killed at 60 s
This PR 23 1 (the start URL) 5 levels finished, exit 0

2. The new test. With the current 404.html it fails: 6 of the page's own assets return 404. With this PR it passes.

3. Existing 404 checks. npx playwright test tests/links.spec.js tests/seo.spec.js tests/accessibility.spec.js --project=chromium -g 404: 10/10 pass with this PR.

4. actionlint .github/workflows/health-check.yml (1.7.12): pass.

Two related problems, not in this PR:

  • Real broken links: project pages link to sibling paths that aren't published here (/eVera/, /eRide/, …, via docs/manifest.json). I'll file that separately.
  • These tests never run in CI: ci.yml only triggers on main and develop, so the Playwright suite never runs on master. I'll file that separately too.

This is a fork PR, so the workflows need a maintainer's approval to run.

…ly crawl — Closes embeddedos-org#166

GitHub Pages serves /404.html at the missing path itself, and its
relative URLs (style.css, index.html, docs/index.html, ...) resolved
under that path: every asset 404'd, and linkinator --recurse followed
the links one level deeper each time until the job was cancelled at 6 h.
<base href="/"> makes them resolve from the root (base-uri 'self' in the
page's CSP allows it). health-check gets timeout-minutes: 45 so a future
hang fails visibly instead of being silently cancelled.

tests/not-found.spec.js loads a nested missing path and requires a 404
status, no failed same-origin request, and no link under that path:
fails against the old 404.html (6 failed assets), passes with this one.
@srpatcha
srpatcha merged commit 8368cd0 into embeddedos-org:master Oct 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

health-check never finishes: 404.html's relative links make the crawl recurse without end (and break the 404 page at nested paths)

2 participants