Skip to content

feat: dynamic open graph image generation for words - #138

Merged
babblebey merged 12 commits into
mainfrom
feat/og
Nov 18, 2026
Merged

babblebey merged 12 commits into
mainfrom
feat/og

Conversation

@babblebey

@babblebey babblebey commented Jan 9, 2025 •

Copy link
Copy Markdown
Member

Description

This pull request adds dynamic Open Graph image generation for dictionary entries, enhancing link previews and social sharing. It introduces a new API endpoint that generates a custom image for each word, and updates the layout to use these images as the Open Graph image for dictionary pages. New dependencies are added to support SVG and image rendering.

Changes Made:

  • Added a new API route src/pages/api/open-graph/[...slug].png.js that generates a custom Open Graph image for each dictionary entry using satori, satori-html, and @resvg/resvg-js. The image includes the site logo, word title, and an excerpt from the definition.
  • Added new dependencies in package.json for image and SVG rendering: @resvg/resvg-js, satori, and satori-html.
  • In src/layouts/word.astro, computed the Open Graph image URL for each word and passed it as the ogImageUrl prop to the base layout.

Related Issue

NA

Screenshots/Screencasts

image

Notes to Reviewer

NA

@vercel

vercel Bot commented Jan 9, 2025 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
jargons-dev Ready Ready Preview Nov 18, 2026 5:10pm UTC

@babblebey babblebey changed the title feat/og feat: dynamic open graph image generation for words Nov 18, 2026
@babblebey
babblebey marked this pull request as ready for review November 18, 2026 17:10
@babblebey
babblebey merged commit a1121a5 into main Nov 18, 2026
6 checks passed
@babblebey
babblebey deleted the feat/og branch November 18, 2026 17:15

This branch was successfully deployed

1 active deployment
Preview — 3bcc338c Deployed Nov 18, 2026 by vercel[bot]
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