og-image-routes
Dorkroom's Open Graph image pipeline — regenerate OG images and metadata after adding or changing a route, page, or API endpoint. Covers ROUTE_TITLES/ROUTE_DESCRIPTIONS, the Lucide icon map in api/og.
SKILL.md.claude/skills/og-image-routes/SKILL.md
GitHubDorkroom OG images
Dorkroom generates OG images at runtime from api/og.tsx. There are no
committed PNGs and no dedicated page to screenshot.
When to run this
Adding a new route/page, modifying an existing route, or changing an API endpoint that has metadata.
Procedure
- Update
utils/routeMetadata.ts— add/updateROUTE_TITLESandROUTE_DESCRIPTIONSfor new routes. - Update
api/og.tsx— add a Lucide icon for the new route ingetRouteIcon(). Download the SVG fromunpkg.com/lucide-static@latest/icons/<name>.svgto get exact element data. - Update
api/meta.tsif the route needs dynamic metadata (query params likefilm,developer). - Regenerate previews — run
bun run scripts/preview-og.tsxand visually verify the output inog-previews/(generated; gitignored).
Notes
ROUTE_TITLESis also consumed elsewhere in the app — keep it in sync with the route definitions, not just with the OG output.- Verify the icon renders: a missing entry in
getRouteIcon()falls through to the default icon rather than failing loudly.