Agent rule
When no page shot exists, social preview images use /api/og with title, label, subtitle, and type query params — not static og/dtd.png for content pages. Run sync-docs.js after new blog posts or ADRs to refresh og:image meta. Types: dtd, changelog, decisions, adr, thinking, blog, building, ek-alag, school, pipeline, portfolio.
Status: Superseded in part by ADR-036 (captured pages prefer Supabase page shots)
Context: Static PNGs (og/dtd.png, og/school.png) were mostly empty canvas with tiny text — unreadable on WhatsApp, Twitter, and LinkedIn. Almost every page shared the same image.
Decision:
- Node route
api/og.jsxwith@vercel/og(Node.js runtime — Edge bundler rejects@vercel/ogon this static site) scripts/lib/og-url.js— URL builder, presets,og:image:width/height/altmeta helpersync-docs.js— per-ADR, changelog, thinking, decisions index, blog posts, and listed static pages get dynamic OG URLs
Consequences: package.json adds @vercel/og. Legacy og/*.png remain as fallbacks for JSON-LD logo only. Bust platform cache via LinkedIn Post Inspector after deploy. Crawlers hitting /api/og count against Vercel function limits — prefer ADR-036 shots for high-traffic surfaces.