Skip to content

OG image per project page #24

Open

Description

@devodii

Why

A project link shared in Discord or X should show a card, not a blank preview.

In this repo today

The web app is a client rendered SPA on Vercel, and crawlers do not run JavaScript, so meta tags cannot be set in React. The card needs a server side step.

What to build

  • A Vercel function under apps/web/api/ that renders a PNG with satori and resvg from /api/projects/{id}: name, tagline, contracts count, evidence tier and the hackathon name.
  • A rewrite in vercel.json that sends /project/* requests from known link preview crawlers to a function returning HTML with the right og:title, og:description and og:image. A default card for the home page uses the timeline chart.

Acceptance criteria

  • Sharing a project URL in Discord shows the card.
  • Normal visitors still get the SPA.

See CONTRIBUTING.md for conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions