Documentation
astwerk is a Go-first static site generator. Start with How astwerk thinks — the whole architecture on one page — then Getting started to build your first site. The Quick reference is the core API on one page.
The last group is different: those pages document optional astwerk-live extensions, are still under heavy redesign, and are very likely to change or be removed.
How astwerk thinks
One Go program describes the whole output directory as a tree; Build writes it. Static HTML, no client runtime in core.
No abstraction is a prison
The design law in practice: every convenience has a path back to plain code.
Comparison
How astwerk differs from Hugo, Zola, Eleventy and Astro — and when one of those is the better choice.
Getting started
Install astwerk, write a tree, generate a site.
The Node tree
Node, Build, BuildOptions — the shape of the tree and how it's written.
Ctx & URLs
What the walker tells a page — paths, locale, base — and how to build URLs from it.
Dev server
Watch, rebuild, reload — the loop you leave running while you work.
Scripts & WebAssembly
Compiling Go to wasm as part of the build, with no JS toolchain.
Content & collections
Markdown with TOML front matter, and the list-plus-detail pattern.
Locales & i18n
Locale subtrees are derived from the base tree, not written twice.
Quick reference
The whole API on one page — signatures and copyable snippets, man-page style.
Starter templates
Thirteen copyable .templ files. Copied, never imported.
How it works
The walker, locale derivation and content loading — the three mechanisms, in full.
Common mistakes
The things that bite: the templ ctx collision, absolute URLs, map iteration order, Parallel races.
Deployment
GitHub Pages, Netlify, Cloudflare Pages — the BaseURL and RelativeURLs combination for each.
Client-side tools extension
Optional astwerk-live packages: compiled markup, signals, direct DOM access and jsdom. Still in heavy redesign.
x — compiled reactive markup extension
Markers that generate both the HTML and the JavaScript for a page at build time — no WASM, no framework.
x — structure & scripts extension
Conditional and keyed subtrees, effects, and the JavaScript escape hatch.
reactive — state extension
Signals, effects, computed values and ownership — the state model behind the bindings.
reactive — DOM bindings extension
Fine-grained bindings: text, attributes, classes, forms, conditional and keyed subtrees.
reactive — routing & async extension
Client-side routing and loading async data into signals.
reactive — templ in the browser extension
Rendering and hydrating templ components client-side.
wasmwrap extension
syscall/js made to feel like Go: DOM, style, events, fetch.
wasmwrap — canvas extension
Typed 2D drawing — Canvas, Ctx2D, animation loops.
Testing extension
Unit-test reactive and wasmwrap bindings with jsdom — no browser, no headless driver.