Static site generator · Agent-native publishing · Go · BUSL-1.1
Static site generator for agent-native publishing
One Go binary turns Markdown, SQL databases and code into a static
site: HTML for readers, and clean .md pages,
llms.txt, site-graph.json, WebMCP tools and
ACP/UCP product feeds for agents. A 5,000-post site builds in
2.3 seconds.
Why ssg
Static HTML for people, structured output for agents
-
Agent-native publishing
Every page can ship its authored Markdown and
llms.txtbeside the HTML, plussite-graph.jsonfor links and taxonomies, WebMCP browser tools, and ACP and UCP product feeds for agentic checkout. When you are writing,ssg mcplets your agent query the graph and edit files directly. -
Static site generator at scale
A 5,000-post site builds in 2.3 seconds from a single Go binary, with WebP and AVIF images, feeds, sitemaps and search indexes generated in parallel. Output is byte-identical across worker counts, and
--incrementalwithssg graphrebuilds only what a change touches. -
Markdown, SQL and external APIs
Keep content in local Markdown, pull it over gRPC from MDDB, or query MySQL, MariaDB, PostgreSQL, SQLite and HTTP APIs read-only during the build. There is no export script to maintain, and the database stays behind your firewall.
-
API reference and edge workers
Point
api_docsat JavaScript, TypeScript, Go, PHP, Python or an OpenAPI file to build reference pages in the same search and link check as your guides, with live examples and a Try it console. Need forms, comments, newsletters or a shop? Add a Cloudflare Pages Functions worker template. Writers and designers can edit articles, settings and colours in the browser, each change one commit to your repository.API docs from code · OpenAPI · Workers · Editor and designer
Deploys natively to
Guides
Core guides
The generator itself: install it, write content, configure and theme the build, publish for people and agents, deploy.
-
SSG Installation Guide
This document provides installation instructions for SSG on all supported platforms.
-
Content guide
This document is the canonical reference for local Markdown content in SSG. For configuration keys, see CONFIGURATION.md. For values exposed to themes, see…
-
Configuration reference
SSG can be configured with command-line flags or a YAML, TOML or JSON file. This guide explains the configuration model and advanced features. The exhaustive…
-
Deployment guide
SSG can package a generated site, publish it directly, or run as a GitHub Action. Deployment always happens after generation and enabled post-processing, so…
-
Upgrading
Every release is a drop-in replacement unless this page says otherwise. Replace the binary, rebuild, and the site you had is the site you get.
-
Migrating a site into SSG (ssg migrate)
One command takes a live site to a working SSG project — today a WordPress site, through the wordpress provider — with URLs, media and taxonomies carried…
30 guides in this group, all of them in the sidebar of every guide.
Optional
Workers & modules
Code that runs per request, beside the static site: forms, comments, a newsletter, a shop, accounts, the admin home, editing in the browser, and two services you host yourself.
-
Workers, modules and services
SSG generates static HTML. The parts of a site that run per request — payments, forms, comments, a newsletter, accounts, editing in the browser — are worker…
-
Worker configuration
The .ssg.yaml keys that bring workers into a build: worker: and workers: (Pages Functions copied into the output), modules: (the module registry the core…
-
Worker secrets and variables
Where the secrets and variables of the worker templates are set, and which names each template reads. Secrets never go in .ssg.yaml; the build only wires the…
-
Running and deploying workers
How the worker templates run beside the preview server, where their wrangler.toml comes from, how a site with workers is deployed, and which Cloudflare set-ups…
-
Server endpoints (portable, no vendor lock-in)
Some sites need a little server behind the static output — a redirect that depends on the request, or a proxy that keeps an upstream key server-side…
-
Setting up the admin tools
This guide takes a site built with ssg from no admin tools at all to a working set: a newsletter with its sending panel, comment moderation, accounts with…
20 guides in this group, all of them in the sidebar of every guide. Every worker and service →
Updates
Latest posts
-
ssg 1.9.10: A Shop on a Static Site
The ecommerce worker sells ebooks and other files from a site built with ssg: a basket, checkout through Stripe or PayPal, VAT per country, gapless invoices, expiring download links and an admin panel.
-
ssg 1.9.10: Edit and Design in the Browser
Two optional workers let people write articles, paste images and change settings and colours in the browser, each change one commit to the site's repository.
-
ssg 1.9.9: One Sign-In for Every Panel
1.9.9 adds accounts with roles and a second factor, and an admin home that ties the newsletter, comments and accounts panels together under one sign-in.
-
ssg 1.9.8: The Newsletter Template Learns to Send
The newsletter template used to stop at a CSV export. 1.9.8 adds an optional worker that sends campaigns from your own Cloudflare account.
-
Turn an Article Into a Presentation
Story mode turns a post into a reading companion and a fullscreen presentation built from its own photographs. How to turn it on and set it up.
-
ssg 1.9: Share Cards, a Ceiling on Memory and Three Migration Fixes
ssg 1.9.0 draws a share card for every page, keeps a build inside a CPU and memory limit, splits a generated site's sitemap by source, and fixes three ways a migrated site could quietly ship the wrong thing.