v1.0.0

Introduction

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 .hbs files 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, a width, and a height. 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 .hbs file. 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:

Shell
bun add bongo@npm:@bongo/bongo

All 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:

Shell
bun install
bun test
bun run build

To run the example site:

Shell
bun run example dev

The package build uses Rolldown and writes the publishable package files in place.

Next steps

Edit this page on GitHub MIT license · bongo v1.0.0

    Type to search page titles and sections.