feat(web): add Open Graph and Twitter link previews#68
Conversation
Shared links to the web app previewed as "404: This page could not be found" because the root redirects into the auth-gated dashboard, so crawlers never saw real metadata. - Add metadataBase, openGraph, and twitter metadata to the root layout - Generate a branded 1200x630 preview card via next/og (opengraph-image.tsx, re-exported as twitter-image.tsx) — no static asset to maintain - Make /opengraph-image and /twitter-image public in proxy.ts so crawlers can fetch the image without authentication Public pages (e.g. /sign-in) now render a proper social card.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Shared links to the web app previewed as "404: This page could not be found" because the root URL redirects into the auth-gated dashboard, so crawlers (LinkedIn, X, Slack, etc.) never saw real metadata.
This adds proper social-share previews:
metadataBase+openGraph+twittermetadata on the root layout.next/og(opengraph-image.tsx, re-exported astwitter-image.tsx) — no static asset to maintain./opengraph-imageand/twitter-imagemarked public inproxy.tsso crawlers can fetch the image without authentication.Public pages (e.g.
/sign-in) now render a polished card with the Echo brand, tagline, and tech stack.Notes
Because the whole app is auth-gated, the recommended shareable link for social posts is a public page such as
/sign-in(the bare domain still redirects into the dashboard). A dedicated public landing page could make the bare domain preview too — happy to follow up if wanted.Verification
pnpm --filter web lint— passpnpm --filter web typecheck— passpnpm --filter web build— pass (/opengraph-image+/twitter-imagecompile as static routes)