Skip to content

Social cards

The included tools/social-card.mjs produces a real1200 × 630 PNG plus an alternative-text companion from local public JSON. It uses original Synergetics composition, bundled licensed Instrument Sans and pinned Satori/Sharp. No service, API credential, account access or remote font/image fetch is used. The web theme itself has no server-side PNG compositor.

On an authoring workstation with Node 24, install the tools/package.json dependencies in that tools directory using your normal development policy; do not install them on Ghost or ship node_modules in a theme ZIP. This workspace verifies using its already-approved existing Astro dependencies, with no new install.

node social-card.mjs --input social-card.example.json --output my-card.png

An explicit —dependencies /path/to/an/installed/package.json can reuse an existing matching toolchain. It is a local development path, never a public URL. —force is required to overwrite an image. Inputs are title, site, optional ordered authors/label/public URL/accent and Light/Dark appearance. Use a concise share title up to 220 characters; no silent truncation. Byline shows first three and a calculated remainder; all supplied authors are preserved in companion alt text. No unpublished/private information belongs in a public share image.

Upload the PNG through native Ghost site/post/page social-image settings and select actual images through Ghost. Native fallbacks remain: explicit social image, feature image, site social image/cover as the platform defines. The tool does not automatically upload or change those fields. Theme CSS cannot restyle a crawler’s rendering of an uploaded image. Use the generated description wherever an applicable native image/alt field is available; no protocol-specific alt authority is invented.

Use —font-regular and —font-bold with appropriate local TTF/WOFF files for additional glyph coverage; font rights and actual rendered output remain yours to verify. The tool never fetches a replacement font.