Problem
The shared metadata in docs/app/layout.tsx sets:
alternates: {
canonical: "/",
}
Because this is the root App Router layout, routes that do not override alternates.canonical render https://www.openui.com as their canonical URL. This currently affects generated docs pages, blog pages, the blog index, and the playground.
For example, /docs/openui-lang and /blog/state-of-generative-ui-report both declare the homepage as canonical even though they contain distinct content and are listed separately in the sitemap.
Root cause
The canonical was introduced in #398 as part of a homepage metadata update, but it was placed in the shared root layout. Route-level metadata overrides titles and descriptions without overriding the inherited canonical.
Impact
Search engines and other crawlers may interpret distinct docs and blog pages as duplicates of the homepage and consolidate their indexing signals.
Proposed fix
- Remove the homepage canonical from the shared root layout.
- Add a homepage-only canonical.
- Add self-referencing canonicals for the playground, blog index and posts, and generated docs pages.
- Preserve the existing route-specific canonicals for chat, projects, and OpenClaw OS.
Acceptance criteria
- Every URL emitted by
sitemap.xml renders exactly one absolute canonical matching its own URL.
- Docs type-check and production build pass.
Problem
The shared metadata in
docs/app/layout.tsxsets:Because this is the root App Router layout, routes that do not override
alternates.canonicalrenderhttps://www.openui.comas their canonical URL. This currently affects generated docs pages, blog pages, the blog index, and the playground.For example,
/docs/openui-langand/blog/state-of-generative-ui-reportboth declare the homepage as canonical even though they contain distinct content and are listed separately in the sitemap.Root cause
The canonical was introduced in #398 as part of a homepage metadata update, but it was placed in the shared root layout. Route-level metadata overrides titles and descriptions without overriding the inherited canonical.
Impact
Search engines and other crawlers may interpret distinct docs and blog pages as duplicates of the homepage and consolidate their indexing signals.
Proposed fix
Acceptance criteria
sitemap.xmlrenders exactly one absolute canonical matching its own URL.