Changelog
All notable changes to ghtmx are documented in this file.
Pre-1.0 stability posture: breaking changes to language syntax, generated-code
shape, and the runtime API are allowed between minor versions and are always
recorded here with a migration note. The discipline is enforced: every entry
in a Changed, Removed, or Breaking section must carry a Migration: note
("Migration: none required" is valid), and internal/installcheck fails the
build otherwise. Releases follow RELEASING.md.
[Unreleased]
Added
- Live example demos on the documentation site: every
examples/*application is now an importable package with a thincmdmain, and the docs binary compiles the real routers in and serves them at their native paths (/todos,/items,/fragments,/events,/hello). Run examples standalone withgo run ./cmdfrom the example directory (previouslygo run .). - The official documentation site (
docs/official): a nested module that dogfoods the engine โ chi routes with symbol and constructor bindings, compile-time fragments behind the chi adapter'sWithPage, theDocViewedevent contract, and every reference document and example embedded viaembed.FS. Compiles natively and tojs/wasmfor Cloudflare Workers (syumai/workers); the embedded copies are drift-gated against their single-source documents in CI. - Initial hard fork of templ at commit
04abee5(seeTEMPL_SYNTAX_BASELINE.md): parser, generator, runtime, formatter, CLI (generate,fmt,lsp,info,version), live-reload dev proxy, and LSP proxy, renamed to theghtmxmodule with the.ghtmxfile extension and*_ghtmx.gogenerated files.
Changed (vs. upstream templ)
- Module path is
github.com/go-monolith/ghtmx; the runtime package isghtmxand generated code callsghtmxruntime(ghtmx/runtime). Migration: replacegithub.com/a-h/templimports withgithub.com/go-monolith/ghtmxand rename.templfiles to.ghtmx. - Generated files use the
ghtmx_7f3b9d1a_variable prefix and the// Code generated by ghtmx - DO NOT EDIT.header. Migration: delete old*_templ.gofiles and runghtmx generate. - Dev-mode environment variables are
GHTMX_DEV_MODE*; the live-reload reserved path is/_ghtmx/reload/. Migration: rename anyTEMPL_DEV_MODE*usage and update proxies that special-cased the old reload path. - The five
hx-*verb attributes are typed route bindings (FR-004 carve-out 1): string URLs areGHTMX-E0602, arbitrary expressionsGHTMX-E0601. Migration: bind a handler symbol (hx-post={ handlers.CreateUser }) or a generated constructor (hx-get={ ghtmxgen.GetUser(id) }); seeCONFORMANCE.md. - Rendering no longer flushes the underlying
http.Flusherafter every component (upstream forced chunked encoding and early header commit). Migration: none for typical apps; for deliberate streaming, render aghtmx.Flush()component where a flush is wanted.
Removed (vs. upstream templ)
- The runtime fragment API (
templ.Fragment,RenderFragments,WithFragments): replaced by compile-timefragmentdeclarations with dual generated entry points (upcoming milestone). Migration: declare afragmentin the template and call its generated...Fragmententry point. - The Prettier integration in
fmtand the test suite (-prettier-command,-prettier-requiredflags): ghtmx has no Node.js dependency anywhere in the toolchain. Migration: none required;ghtmx fmtoutput no longer reformats<script>/<style>bodies via Prettier. - The legacy
templ.WriteWatchModeStringAPI is not carried over. Migration: none required; watch mode uses the dev-mode text sidecars automatically. ghtmx.Class,ghtmx.SafeClass, andghtmx.ConstantCSSClassare carried over (the conformance corpus exercises them) but remain deprecated and are slated for removal before v1.0. Migration: use plain strings for CSS classes.