Skip to content

feat: share cards for every page - #83

Merged
devodii merged 7 commits into
mainfrom
feat/og-images
Nov 20, 2026
Merged

devodii merged 7 commits into
mainfrom
feat/og-images

Conversation

@devodii

@devodii devodii commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Closes #24.

What this does

  • Every page gets a share card in our fonts, gradients and tile style: landing, /hackathon/:id (and Wrapped), project, builder and integration.
  • Link preview crawlers (Discord, X, Slack, LinkedIn, WhatsApp, Telegram and search bots) get a small page with the right og: and twitter: tags. Normal visitors still get the SPA.
  • index.html also carries default tags, so any other crawler still gets the landing card.

Cards

Landing

Hackathon

Project

Builder

Integration

How it works

  • api/og is an edge function that renders a 1200 by 630 PNG with @vercel/og (satori and resvg). The fonts are bundled, so nothing is fetched at request time except the data and the avatar.
  • api/meta returns the HTML with the tags. vercel.json rewrites crawler requests for any page to it and leaves /api and files alone.
  • The cards read the same API as the site: /hackathons, /projects/:id, /builders/:login and /integrations. An unknown page falls back to the landing card.
  • Both responses are cached for an hour at the edge.

Checked

  • All seven cards rendered locally with satori and resvg, and the tag generator ran against the live API.
  • tsc, oxlint and prettier pass.

Not checked yet

  • The edge function itself runs only on Vercel, so please open the preview and try /api/og?path=/. Then check a pasted link in Discord.
  • The function reads VITE_API_URL from the Vercel environment, which the site already uses.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hackproof Ready Ready Preview Nov 20, 2026 12:38pm UTC

Request Review

@devodii
devodii merged commit fc67156 into main Nov 20, 2026
6 checks passed
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.

OG image per project page

1 participant