Renders an Open Graph card for every published post - title, author, and date, in one of three templates. Uploads it and writes the URL to metadata.ogImage on publish. No design tool, no third-party image API, no manual export.
Real output from renderCard, one card per built-in template.
Setup
Install and register
bash
npm install @plugdash/socialcard
js
import { socialcardPlugin } from "@plugdash/socialcard"// in emdash plugins array:socialcardPlugin({ template: "bold" })
After this, every published post gets an OG card automatically. Existing posts need a republish to pick it up - socialcard only runs on content:afterSave.
It looks right. But it's yours to change.
Config options
option
type
default
description
template
"default" | "minimal" | "bold"
"default"
Card layout
width
number
1200
Card width in pixels
height
number
630
Card height in pixels
background
string (hex)
"#0f172a"
Background colour
foreground
string (hex)
"#f8fafc"
Text (and, on minimal, paper) colour
logo
string (URL)
Logo drawn in the top-left corner
fonts.title
string (CSS font stack)
system sans
Font stack for the title line
fonts.body
string (CSS font stack)
system sans
Font stack for the byline
Pairs well with
a card that actually represents the post makes sharepost's links worth clicking, and autobuild makes sure it's live within a minute of publish.