Repository navigation
feat: site.notFound configures the 404 page for unmatched routes (refs #309) - #316
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5 <[email protected]>
jimhoyd
force-pushed
the
site-not-found-309
branch
from
September 20, 2026 17:12
c940b44 to
ebd5a79
Compare
jimhoyd
enabled auto-merge (squash)
September 20, 2026 17:12
This was referenced Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #309 (does not close it).
Shape:
site.notFound: public/404.html, a generatedpageroute at/404.html(text/html, no-store). The runtime answers an unmatched GET/HEAD with that page and status 404 (project security headers and nosniff still apply); other methods keep the plain-text 404. A route that matched but was disabled/denied keeps its own answer.Targets: self-hosted, Vercel, AWS serve it via the runtime;
--target staticwrites it as404.html(point the host error document at it); Cloudflare refuses it at build time like any page route (no asset binding), not silently degraded.Reporting: one generated route in routes/audit/explain counts (
site.notFound), consistent with #298; sitemap excludes it. Schema, docs/SITE.md, STATIC.md, YAML reference, llms-full, starter AGENTS.md updated; new executable example examples/not-found (example count 17 to 18); tests in test/site.test.ts.Verification: npm ci, npm run verify (0 failures), npm run check:docs.
Open decisions: fixed path /404.html means a direct request returns 200 (matches static hosts); a declared /404.html route shadows the key. Cloudflare support needs an asset-binding decision first.
🤖 Generated with Claude Code