-
Notifications
You must be signed in to change notification settings - Fork 2
Add new card-style OG image templates #5
Copy link
Copy link
Open
Labels
featureNew feature requestNew feature requestgood first issueGood for newcomersGood for newcomerstemplatesTemplate additions and improvementsTemplate additions and improvements
Description
Description
Add new OG image templates to expand the gallery beyond the current 109 templates across 12 categories.
Current state
- 109 templates across 12 categories: Blog, Product Launch, SaaS/Landing, GitHub/OSS, Event/Conference, Podcast/Video, Developer/Portfolio, Newsletter, Social/Quote, E-commerce, Job Posting, Tutorial/Course
- Templates are defined in
src/templates/{category}/{id}.ts - Each exports a
TemplateDefinition(interface insrc/templates/types.ts)
Template ideas
- Profile Card — avatar, name, title, social links on a clean background
- Product Card — product image placeholder, title, price, and CTA
- Blog Summary Card — featured image area, title, author, and read time
- Testimonial Card — quote, avatar, name, and company
- Stats Card — key metrics with large numbers and labels
- Changelog — version number, date, and release highlights
- Comparison — side-by-side feature comparison layout
How to add a template
- Create
src/templates/{category}/{id}.ts— export aTemplateDefinition - Re-export it from
src/templates/{category}/index.ts - Import and register it in
src/templates/registry.ts - Run
npm run testto verify
Use src/templates/blog/minimal-dark.ts as a reference implementation.
Shared utilities available in src/templates/utils.ts: truncate(), autoFontSize(), commonFields, linearGradient(), contrastText().
Constraints
- Satori only supports flexbox — no CSS grid
- Every
divmust havedisplay: 'flex'explicitly in its style object - No CSS classes in satori render functions — inline styles only
- Font files must be listed in
astro.config.mjsincludeFilesif adding new fonts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew feature requestNew feature requestgood first issueGood for newcomersGood for newcomerstemplatesTemplate additions and improvementsTemplate additions and improvements