Deterministic Open Graph image generation with useful visual presets and a fully custom renderer escape hatch.
Website · OG checker · npm · Package guide · Stability · Releases · Issues · Contributing
Use @santi020k/og with Astro, Next.js, plain Node.js, monorepos, Markdown collections, CMS data,
or a static array. Start with the simple, article, docs, or product preset and add your
content and brand. The package handles rendering, output paths, content-aware caching, bounded
concurrency, safe cleanup, encoding, and CI verification. A custom Sharp or Satori renderer remains
available when a project needs a unique composition. Framework-neutral metadata helpers reuse the
same page definition for canonical, Open Graph, X, robots, plain HTML, and Next.js metadata.
The website checker and santi-og inspect analyze the result for deployed and localhost projects.
pnpm add -D @santi020k/og
pnpm exec santi-og init
pnpm exec santi-og generateThe generated og.config.mjs starts with the neutral product preset. Replace its sample cards,
brand, and theme—there is no SVG template to maintain.
See all four presets rendered with real package output in the live gallery, then open the example-led documentation to copy a preset, portable metadata, Markdown content, Sharp, or Satori configuration. The package guide also covers static assets, worker threads, caching, cleanup, and migration guidance.
| Workspace | Purpose | Destination |
|---|---|---|
packages/og |
Publishable generator, CLI, renderers, and programmatic API | npm · Package guide |
apps/web |
Astro website, branding, metadata, and social card | Website |
pnpm install
pnpm devRun the complete package and website quality suite before shipping:
pnpm validateThe release gate also installs the packed package into plain Node.js, Astro, and Next.js projects:
pnpm test:consumersThe website and its protected public-URL inspection function deploy to the santi020k-og
Cloudflare Pages project when changes reach main. GitHub uses the website-production
environment, the CLOUDFLARE_API_TOKEN and
CLOUDFLARE_ACCOUNT_ID secrets, and these repository variables:
CLOUDFLARE_PAGES_PROJECT_NAME=santi020k-ogPUBLIC_SITE_URL=https://og.santi020k.com
Package releases are deliberate. Run the Release GitHub workflow with a version matching
packages/og/package.json. The release environment must provide NPM_TOKEN; the workflow
validates the repository, publishes with npm provenance, verifies the registry result, and then
rebuilds registry-installed consumers before creating the matching Git tag and GitHub release. See
the release acceptance checklist for the complete gate.
MIT. See LICENSE.