Skip to content

chassis: auto-derive canonical/og:url from the surface's production base#471

Merged
ChBrain merged 1 commit into
mainfrom
chassis/canonical-auto-derive
Jul 4, 2026
Merged

chassis: auto-derive canonical/og:url from the surface's production base#471
ChBrain merged 1 commit into
mainfrom
chassis/canonical-auto-derive

Conversation

@ChBrain

@ChBrain ChBrain commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Completes the canonical story from #463 in one chassis change instead of per-surface adoption: BaseLayout now derives the canonical (and og:url) from the surface's production base in SurfaceUrls — deliberately urlsFor() rather than the DEPLOY_ENV-switched URLS, because a canonical is a statement of authority, not navigation: the staging path-prefix copy of a page must declare the production URL, which is what stops the multi-doc-root duplicates competing in search.

Verification: build + unit + site a11y green; spot-checked emitted canonicals: https://plays.kaihacks.ai/buechner/woyzeck/, https://kaihacks.ai/cvi/ (nested main page reproduces URLS.cvi exactly), subdomain roots for architecture/writing; apex placeholder emits none.

🤖 Generated with Claude Code

https://claude.ai/code/session_0176ZYTwoV8V4So9SBTizc5X


Generated by Claude Code

An explicit canonical prop still wins; the bare apex placeholder (surface
"root", no SurfaceUrls entry) stays canonical-less unless one is passed.
Derivation uses urlsFor() (production) rather than the DEPLOY_ENV-switched
URLS on purpose: every deployed copy of a page - staging path prefix or
production subdomain - must declare the production URL as its canonical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0176ZYTwoV8V4So9SBTizc5X
@ChBrain
ChBrain merged commit 75489a1 into main Jul 4, 2026
35 checks passed
@ChBrain
ChBrain deleted the chassis/canonical-auto-derive branch July 4, 2026 20:02
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.

2 participants