astwerk

Static sites, no magic

astwerk

A minimal, no-magic static site generator for Go + templ. No Node.js, no JS build tooling. Interactivity via compiled markup — or Go → WASM when you need the whole language.

go get github.com/LukasDerBaum42/astwerk

Build a site Quick reference See it running

  • Go 1.25+
  • No Node.js
  • Zero config
  • MIT
the tree is the site
build/ ├── index.html ├── about/ │   └── index.html ├── style/ └── scripts/

Live — compiled markup, no WASM. Toggle a node and the output changes.

Design law

Abstract only the repeating boilerplate. If a project needs something the tree can’t express, it falls back to plain Go — never a wall it can’t get past.

The whole mechanism

You describe the output directory as a tree of Nodes and call Build. There is no config file, no convention scanner, no code generation. That is the entire API surface for generating a site.

go
root := ssg.Node{
	Title: "My Site",
	Page:  ssg.Templ(views.Home),
	Children: map[string]ssg.Node{
		"docs":    {Title: "Docs", Generate: docPages},
		"style":   {CopyFrom: "style"},
		"scripts": {CompileFrom: "scripts"},
	},
}

if err := ssg.Build(root, ssg.BuildOptions{Dev: dev}); err != nil {
	log.Fatal(err)
}

That writes build/index.html, build/docs/index.html, copies style/ in, and compiles scripts/ to WebAssembly.

What you get

Not for you if…

Full comparison against Hugo, Zola, Eleventy and Astro →

Make it yours

This accent switcher is live, and it is built with astwerk's own x package — the buttons are compiled markup, not a hand-written script. Pick a colour and it sticks for the rest of the site.

Accent