Dokumentation
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.
Wie astwerk denkt
Ein Go-Programm beschreibt das ganze Ausgabeverzeichnis als Baum; Build schreibt es. Statisches HTML, keine Client-Laufzeit im Kern.
Keine Abstraktion ist ein Gefängnis
Das Design-Gesetz in der Praxis: jede Bequemlichkeit hat einen Weg zurück zu normalem Code.
Vergleich
Wie sich astwerk von Hugo, Zola, Eleventy und Astro unterscheidet — und wann eines davon die bessere Wahl ist.
Erste Schritte
astwerk installieren, einen Baum schreiben, eine Seite generieren.
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.
Häufige Fehler
Die Dinge, die beißen: die templ-ctx-Kollision, absolute URLs, Map-Iterationsreihenfolge, Parallel-Races.
Deployment
GitHub Pages, Netlify, Cloudflare Pages — die BaseURL-/RelativeURLs-Kombination für jeden Host.
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.