Skip to content

feat: make OG image appearance configurable via theme/config #135

@rohilsurana

Description

@rohilsurana

Problem

`src/server/routes/og.tsx` has all visual properties hardcoded:

  • Background: `#0a0a0a`
  • Text color: `#fafafa`
  • Font: Inter (fetched from Google)
  • Title size: 56px
  • Dimensions: 1200x630

Site owners using a brand with different colors/fonts get generic-looking social previews.

Also, the output is SVG which many social platforms (Twitter/X, LinkedIn) don't render — should convert to PNG.

Suggested Fix

  • Read colors/font from theme config or a new `og` config section
  • Convert SVG → PNG using Sharp (already a dependency)
  • Cache generated images with content-based keys

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions