Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Astro v6 starter for Cloudflare Workers with dynamic OG image generation via satori and resvg.
AstroFlareOG is an Astro v6 starter theme for Cloudflare Workers that specializes in dynamic Open Graph image generation, using cf-workers-og (built on satori and resvg) to render social share images without a headless browser.
AstroFlareOG is an Astro v6 starter theme released under the MIT License by Kevin Firko of Bitcurve Systems. It runs on Cloudflare Workers through the @astrojs/cloudflare adapter and generates static pages by default, with opt-in server-side rendering for routes such as per-post OG images. The starter includes a realistic blog as an Astro content collection with Markdown and MDX support, a minimal responsive layout, and TailwindCSS styling with a custom prose utility for long-form content.
cf-workers-og (satori + resvg); no Puppeteer and no React required.@astrojs/cloudflare adapter with hybrid rendering: static pages by default, SSR enabled by adding export const prerender = false..prose utility built with @utility and :where() selectors, plus a .not-prose escape hatch, and custom text sizes like text-h1 through text-h6.@astrojs/mdx, with a realistic blog structure to adapt.@astrojs/sitemap is configured and compatible with the project's trailing slash settings.astro/tsconfigs/strictest, includes @astrojs/check, BiomeJS for TypeScript linting/formatting, and Prettier with prettier-plugin-astro for Astro files..woff versions are included in public/fonts/ because Satori doesn't support variable fonts or WOFF2.wrangler.example.jsonc and pnpm typegen to generate worker-configuration.d.ts from wrangler.jsonc.AstroFlareOG is aimed at developers who want a production-ready starting point for Astro sites on Cloudflare Workers, especially those who need social sharing images that are generated on demand. Blog authors and content publishers can use the included content collection and per-post OG image route to make every article shareable. Teams deploying to Cloudflare Workers can use the preconfigured Wrangler settings and hybrid rendering setup to separate static assets from server-rendered routes.
/hello-world/og.png style route.prose utility, and typography scale to build a consistent long-form reading experience.After cloning the repo, rename the project in package.json, run pnpm install, copy wrangler.example.jsonc to wrangler.jsonc, run pnpm typegen, and edit astro.config.ts to set DEPLOY_DOMAIN and ASTRO_SITE. The dev server starts at localhost:4321 with pnpm dev; pnpm preflight runs typegen, typecheck, checks, and build in sequence, and pnpm deploy:worker builds and deploys via Wrangler. To enable SSR for a route, add export const prerender = false and ensure the route pattern is covered by assets.run_worker_first in wrangler.jsonc.
No. OG images are rendered server-side by cf-workers-og, which uses satori and resvg to convert JSX into SVG and then PNG. That means no Puppeteer dependency and no React runtime on the worker.
Satori doesn't support variable fonts or WOFF2, so the starter loads variable Atkinson fonts for the site and stores non-variable .woff versions in public/fonts/ for OG image rendering.
No. Cloudflare-defined environment variables are not available to Astro during build; they can be imported in server-side code from cloudflare:env. Local development overrides go in a .dev.vars file.
Yes. The example blog is an Astro content collection with Markdown and MDX support via @astrojs/mdx.
The starter is released under the MIT License, so it is free to use and modify.
