docs: open graph + twitter cards + site metadata (social-kit port)#21
Merged
Conversation
Ports the OG card from the Claude Design social-kit handoff (1BcwLvogEyTm8D4LpOGcSw) into the docs site, plus the surrounding metadata that platforms use to render link previews. **Metadata (`layout.tsx`)** - `metadataBase` → `https://vitus-labs.com` (overridable via `NEXT_PUBLIC_SITE_URL`) - `title` template + default `Vitus Labs — Composable React engine` - `description` includes the measured numbers: 15 packages, 4.82 KB CSS-in-JS engine, 170+ CSS props, 123 motion presets - `openGraph` block (type, locale, url, siteName, title, description) - `twitter` block (`summary_large_image`, creator handle) - `robots`, `alternates.canonical`, `keywords`, `category`, `authors` - `viewport.themeColor` per color-scheme (`#0a0b0d` dark, `#fdfbf5` light) and `colorScheme: 'dark light'` **OG image (`opengraph-image.tsx`)** - 1200×630 PNG generated at build time via `next/og` `ImageResponse` (with `dynamic = 'force-static'` so the static export emits a real PNG to `/out/opengraph-image` instead of needing a runtime). - Stacked-triangle mark + `vitus·labs` lockup top-left. - Headline `Build, style & ship faster.` with chartreuse italic on `faster.` — same wording as the hero. - Measured subtitle row. - Orbital motif (four rings + center disc + accent node) on the right. - Radial chartreuse + cobalt aurora glow with faint dot-grid behind. - Footer: `vitus-labs.com` · `MIT · TYPESCRIPT-FIRST`. **Twitter image (`twitter-image.tsx`)** - Same 1200×630 artwork — Twitter's `summary_large_image` uses the same dimensions, so it re-uses the default export from `opengraph-image.tsx`. Route-segment config (`dynamic`, `alt`, `size`, `contentType`) is inlined per file because Next.js parses it statically and rejects re-exported config. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the OG/Twitter card design from the Claude Design social-kit handoff into the docs site, plus the surrounding metadata that platforms (Slack, Discord, Twitter/X, LinkedIn, iMessage, etc.) use to render link previews.
Metadata (
layout.tsx)metadataBase→https://vitus-labs.com(overridable viaNEXT_PUBLIC_SITE_URL)openGraphblock (type, locale, url, siteName, title, description)twitterblock —summary_large_image, creator handlerobots,alternates.canonical,keywords,category,authorsviewport.themeColorper color-scheme +colorScheme: 'dark light'OG image (
opengraph-image.tsx)1200×630 PNG generated at build time via
next/ogImageResponse(withdynamic = 'force-static'so the static export emits a real PNG to/out/opengraph-image). Matches the social-kit design:vitus·labslockup top-leftfaster.vitus-labs.com·MIT · TYPESCRIPT-FIRSTTwitter image (
twitter-image.tsx)Re-uses the OG renderer (same 1200×630 dimensions). Route-segment config is inlined because Next.js parses it statically and rejects re-exported config.
Test plan
bun run build— clean (70 pages, includes/opengraph-imageand/twitter-image)/out/opengraph-imageis a real 1200×630 8-bit PNG (143 KB)og-default.pngdesign🤖 Generated with Claude Code