Skip to content

feat: per-page social share images for every page#12

Merged
anurag629 merged 1 commit into
developfrom
feat/per-page-og-images
Jul 8, 2026
Merged

feat: per-page social share images for every page#12
anurag629 merged 1 commit into
developfrom
feat/per-page-og-images

Conversation

@anurag629

@anurag629 anurag629 commented Jul 8, 2026

Copy link
Copy Markdown
Member

What

Every page shared to social currently falls back to the single generic root OG image. This adds a distinct, on-brand 1200×630 Open Graph / Twitter card for each page (homepage + all four tools), driven entirely by the tool registry.

How

  • lib/og.tsx — one shared renderer. Embeds the already-bundled subset Noto Sans (Regular + Bold) so text is real hinted glyphs, not the satori fallback. Accent colour, title, description, feature chips, and URL all come from each tool's TOOLS entry, so cards can never drift from the tool metadata.
  • One opengraph-image.tsx route per tool + a rewritten homepage card. Each is a few lines that hand its registry entry to the renderer.
  • Glyphs missing from the font subset are sanitized (the arrow in Image → URI renders as Image to URI).

Next mirrors each file image to twitter:image automatically, so tool pages now emit both og:image and twitter:image. All five images prerender as static PNGs at build time (verified: ○ (Static) in the build output), so there is no runtime cost or external dependency.

Verification

  • npm run build — all 5 OG routes prerender static, no errors
  • npm run lint — clean
  • npm run test — 27/27 pass
  • Rendered and eyeballed all five cards locally (home + json-formatter + jwt-decoder + base64 + invoice-generator); each is distinct by accent colour with correct copy and no missing glyphs.

Card design

Brand mark + CODERCOPS · TOOLS eyebrow, a category badge, accent bar, large title, description, feature chips, and the live URL with a fading accent bar motif. Homepage uses the cyan brand accent and the four tool colours in the footer bar.

Part of the SEO / discoverability plan. Next PRs: structured data (FAQ / Organization / breadcrumbs), on-site GitHub link + live star count, README overhaul (which will reuse these images).

Add a registry-driven Open Graph / Twitter card renderer so the homepage
and each tool page get a distinct, on-brand 1200x630 image instead of all
sharing one generic root card.

- lib/og.tsx: shared renderer that embeds the bundled subset Noto Sans for
  crisp text; accent colour and copy come from each tool's registry entry
- one opengraph-image route per tool, plus a rewritten homepage card
- sanitize glyphs absent from the font subset (the arrow in "Image → URI"
  becomes "Image to URI")

Next mirrors each file image to twitter:image automatically. The images
prerender as static PNGs at build time.
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
toolbelt Ready Ready Preview, Comment Jul 8, 2026 7:41am

Request Review

@anurag629 anurag629 merged commit a1942b5 into develop Jul 8, 2026
3 checks passed
@anurag629 anurag629 deleted the feat/per-page-og-images branch July 8, 2026 08: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