bongo is a static site generator. It bundles scripts with Rolldown, builds styles with LightningCSS, renders templates with tempura, and reads Markdown through the @bongo/markdown plugin.
What bongo does
bongo passes your content files through a loader pipeline. It applies layouts and partials with tempura. It bundles client assets: Rolldown builds the JavaScript, and LightningCSS builds the CSS. Then it writes the site to public/.
You write one config file, bongo.config.ts, and put your files in a small set of folders. Project layout describes each folder and each step of a build.
Features
- Content: Markdown, HTML, and
.hbsfiles become pages. Their paths set their URLs. See Content. - Frontmatter: a typed YAML subset at the top of each file. See Frontmatter.
- Templates: layouts and partials with
$site,$page,$pages,$section,$tags, and$data. See Templates and Partials. - Data: JSON, YAML, and module files in
data/are available in every template. See Data. - Assets:
<bongo:script>,<bongo:style>, and<bongo:asset>elements bundle and publish files under content-hashed names. See Special elements. - Images: bongo resizes and converts images, and gives them a
srcset, awidth, and aheight. See Images. - Dynamic images: draw a partial as an image, such as a social card for each page. See Dynamic images and Open Graph images.
- CSS: bundling, autoprefixing, nesting, CSS modules, and packages in
@import. See CSS. - Output files: a sitemap, a
robots.txt, or a feed from one.hbsfile. See Output files. - Data modules: JSON files from a TypeScript or JavaScript module, such as a search index. See Data modules.
- Client runtime: optional client-side navigation, prefetch, and view transitions. See Client runtime and View transitions.
- Dev server: live reload and an error overlay. See Dev server.
- Hooks: change each page before bongo writes it. See Hooks.
Packages
| Package | Description |
|---|---|
bongo |
The core static site generator and the optional browser runtime. |
@bongo/markdown |
Markdown loader plugin. See @bongo/markdown. |
@bongo/feed |
RSS and Atom feed plugin. See @bongo/feed. |
create-bongo |
Project scaffolding CLI. See Quick start. |
The core package is published as @bongo/bongo. Install it and import it through the bongo alias:
bun add bongo@npm:@bongo/bongoAll examples in these docs use the name bongo.
Runtimes
bongo runs in Bun 1.4 or later, Deno, and Node 24 or later. Image processing uses Bun.Image, so it needs the Bun runtime. Without Bun, bongo copies each image as it is. See Images. Dynamic images work in every runtime as SVG and PNG, and need Bun for JPEG and WebP.
Work on bongo
The bongo repository holds the static site generator, its Markdown and feed plugins, the project scaffolder, and an example site for development. Bun 1.4 or later is the primary development tool. Node 24 or later is still supported at runtime, but the workspace commands use Bun:
bun install
bun test
bun run buildTo run the example site:
bun run example devThe package build uses Rolldown and writes the publishable package files in place.
Next steps
- Quick start: create a site and run it.
- Project layout: learn what each folder does.
- Config: see every config field.