ogimage

package
v0.0.0-...-1087858 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Width  = 1200
	Height = 630
)

Variables

This section is empty.

Functions

func CacheKey

func CacheKey(c Card) [32]byte

func Generate

func Generate(c Card) ([]byte, error)

Types

type Card

type Card struct {
	Title       string
	Description string
	SiteName    string
	AccentColor string // optional: #rgb or #rrggbb hex; read from --og-accent in tokens.css
}

Card holds the text and branding inputs for OG image generation. AccentColor is an optional CSS hex color (#rgb or #rrggbb) used for the left stripe and site-name text. When empty or invalid, a neutral slate accent is used so the card is presentable for any generic website.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL