OGXOGX

Blog Preset

Blog post OG images with author and metadata

The blog preset is designed for blog posts with author information and metadata.

Usage

const png = await ogx({
  preset: 'blog',
  title: 'How to Build a Modern API',
  author: 'Carlos',
  authorAvatar: avatarBase64,
  category: 'Tutorial',
  date: 'Dec 27, 2024',
  readingTime: '5 min read',
  coverImage: imageUrl,
  colorScheme: 'dark',
});

Options

OptionTypeRequiredDescription
titlestringYesPost title
authorstringNoAuthor name
authorAvatarstringNoAvatar URL or base64
categorystringNoCategory badge
datestringNoPublication date
readingTimestringNoReading time
coverImagestringNoRight-side image
colorScheme'dark' | 'light'NoColor theme

Features

  • Two-column layout with optional cover image
  • Category badge with accent color
  • Author section with avatar
  • Metadata row with date and reading time
  • Gradient transition to cover image

On this page