Skip to content

Fix canonical metadata for public routes - #1405

Merged
EmersonBraun merged 1 commit into
mainfrom
codex/canonical-consolidation-20260809
Aug 9, 2026
Merged

Fix canonical metadata for public routes#1405
EmersonBraun merged 1 commit into
mainfrom
codex/canonical-consolidation-20260809

Conversation

@EmersonBraun

Copy link
Copy Markdown
Member

What changed

  • stop inheriting the homepage canonical across public routes
  • add self-referencing canonicals for the homepage, ecosystem, community, evals, stack, learn, and showcase surfaces
  • cover all generated learn and showcase routes with a canonical metadata regression test

Why

The root layout declared the homepage canonical globally. Next.js propagated it to child routes that did not override alternates.canonical, causing distinct public pages to advertise the homepage as their preferred URL.

Impact

Thirty-two affected public routes now emit their own canonical URL, while the homepage keeps the existing root canonical and localized alternates.

Validation

  • npm exec -- vitest run apps/docs-next/tests/canonical-metadata.test.ts --coverage --coverage.include=apps/docs-next/lib/canonical-url.ts
  • pnpm --filter @agentskit/docs-next lint
  • pnpm docs:bridge:gate
  • production Next.js build
  • inspected 33 generated HTML files and verified each canonical exactly matches its route

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Lighthouse

URL Performance Accessibility Best practices SEO
http://127.0.0.1:3000/ 66 92 96 100
http://127.0.0.1:3000/docs 67 100 96 100
http://127.0.0.1:3000/docs/get-started/getting-started/quickstart 68 96 96 100
http://127.0.0.1:3000/stack 92 100 96 100
http://127.0.0.1:3000/showcase 92 100 96 100

Run by .github/workflows/lighthouse.yml.

@EmersonBraun
EmersonBraun marked this pull request as ready for review August 9, 2026 21:48
@EmersonBraun
EmersonBraun merged commit b4af818 into main Aug 9, 2026
13 checks passed
@EmersonBraun
EmersonBraun deleted the codex/canonical-consolidation-20260809 branch August 9, 2026 22:17
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.

1 participant