feat(registry): add OG image generation for all pages#102
Merged
Conversation
Dynamic OG images via /api/og route using next/og ImageResponse. Frontmatter-driven config adapted from bntvllnt pattern. - Add lib/og.ts (Zod schema, URL builder, metadata generators) - Add lib/og-templates.ts (4 templates: home, component, docs, page) - Add app/api/og/route.ts (ImageResponse with category badges, footer) - Migrate static page content from inline to MDX files with frontmatter - Add lib/content.ts + lib/schemas.ts (gray-matter loader, Zod validation) - Wire generateMetadata with OG + Twitter cards on all 5 routes - Add metadataBase to layout.tsx for absolute OG URLs Closes #100
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Temporary /og-preview page showing all generated OG images: - 4 static pages + all component pages grouped by category - Lazy-loaded images with URL display for debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/api/ogrouteopenGraph+twittermetadata wired on all routesArchitecture
New Files
lib/og.tsgenerateOGImageURL(),generateOGMetadata(),generateTwitterMetadata()lib/og-templates.tsapp/api/og/route.tsnext/ogImageResponse with category badges + footerlib/content.ts+lib/schemas.tscontent/pages/*.mdxModified Files
app/layout.tsx— addedmetadataBasefor absolute OG URLsapp/components/[slug]/page.tsx— extend metadata with OG imageTest plan
pnpm buildpasses (103/103 pages generated)/api/og?title=Button&type=component&category=core— returns PNG image/api/ogwith no params returns default VLLNT UI imageCloses #100