Skip to content

Add OG image endpoint and default meta tags for social thumbnails#128

Merged
reteps merged 8 commits intomainfrom
reteps/og-thumbnail
Feb 27, 2026
Merged

Add OG image endpoint and default meta tags for social thumbnails#128
reteps merged 8 commits intomainfrom
reteps/og-thumbnail

Conversation

@reteps
Copy link
Member

@reteps reteps commented Feb 24, 2026

Description

Social platforms were scraping random page content as thumbnails. This adds an edge API route that generates a branded 1200×630 OG image with the PrairieLearn logo and tagline, default Open Graph and Twitter Card meta tags in _document.tsx, and homepage-specific og:title/og:description.

Generated with Claude.

Claude says: text-wrap: balance isn't supported by Satori (the engine that renders ImageResponse).

Testing

http://localhost:3000/api/og?title=Mastery+learning+meets+online+assessment
image

http://localhost:3000/api/og

image

Social platforms were scraping random page content as thumbnails. This
adds an edge API route that generates a branded 1200×630 OG image with
the PrairieLearn logo and tagline, default Open Graph and Twitter Card
meta tags in _document.tsx, and homepage-specific og:title/og:description.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 24, 2026

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

Project Deployment Actions Updated (UTC)
marketing Ready Ready Preview, Comment Feb 27, 2026 1:46am

Request Review

reteps and others added 2 commits February 24, 2026 13:41
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@reteps reteps marked this pull request as ready for review February 25, 2026 19:37
@reteps reteps merged commit 2d760d4 into main Feb 27, 2026
3 checks passed
@reteps reteps deleted the reteps/og-thumbnail branch February 27, 2026 02:07
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.

2 participants