Skip to content

fix: use absolute post canonical urls#6226

Merged
idoshamun merged 1 commit into
mainfrom
codex/fix-post-canonical-urls
Jun 21, 2026
Merged

fix: use absolute post canonical urls#6226
idoshamun merged 1 commit into
mainfrom
codex/fix-post-canonical-urls

Conversation

@idoshamun

@idoshamun idoshamun commented Jun 21, 2026

Copy link
Copy Markdown
Member

What changed

  • Added a normalized post canonical URL helper that falls back to https://daily.dev when NEXT_PUBLIC_WEBAPP_URL is relative.
  • Updated post, post share, and post analytics SEO overrides to emit absolute canonicals for post slugs.

Why

Post detail surfaces were overriding the app-wide absolute canonical with webappUrl, which can resolve to /, causing <link rel="canonical"> and fallback og:url to render as relative paths.

Validation

  • pnpm --filter webapp exec eslint lib/seo.ts 'pages/posts/[id]/index.tsx' 'pages/posts/[id]/share/index.tsx' 'pages/posts/[id]/analytics/index.tsx' --ext .ts,.tsx --max-warnings 0
  • git diff --check

Known CI

  • typecheck_strict_changed fails on existing strict-null issues in the touched post share/analytics files. Those fixes were intentionally removed to keep this PR limited to canonical URL behavior.

Preview domain

https://codex-fix-post-canonical-urls.preview.app.daily.dev

@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jun 21, 2026 12:02pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Jun 21, 2026 12:02pm

Request Review

@idoshamun idoshamun force-pushed the codex/fix-post-canonical-urls branch from 5b926ae to 9db13a9 Compare June 21, 2026 11:57
@idoshamun idoshamun marked this pull request as ready for review June 21, 2026 12:21
@idoshamun idoshamun merged commit aba039b into main Jun 21, 2026
11 of 13 checks passed
@idoshamun idoshamun deleted the codex/fix-post-canonical-urls branch June 21, 2026 12:21
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