socialcards

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg map[string]any) *plugin.Plugin

New constructs the social_cards plugin from its config map.

Types

type CardParams

type CardParams struct {
	Title          string
	Description    string
	SiteTitle      string
	CollectionName string
	Date           time.Time
	BgColor        color.NRGBA
	AccentColor    color.NRGBA
	TextColor      color.NRGBA
	Faces          *FaceSet
	BoldFont       *opentype.Font
}

CardParams holds all data needed to render a single social card.

type FaceSet

type FaceSet struct {
	Regular font.Face // 22pt
	Bold    font.Face // 56pt (may be resized per-card)
	Small   font.Face // 18pt
	Footer  font.Face // 16pt
}

FaceSet holds pre-created font faces for a single goroutine.

Jump to

Keyboard shortcuts

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