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 thin cmd main, and the docs binary compiles the real routers in and serves them at their native paths (/todos, /items, /fragments, /events, /hello). Run examples standalone with go run ./cmd from the example directory (previously go 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's WithPage, the DocViewed event contract, and every reference document and example embedded via embed.FS. Compiles natively and to js/wasm for 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 (see TEMPL_SYNTAX_BASELINE.md): parser, generator, runtime, formatter, CLI (generate, fmt, lsp, info, version), live-reload dev proxy, and LSP proxy, renamed to the ghtmx module with the .ghtmx file extension and *_ghtmx.go generated files.

Changed (vs. upstream templ)

  • Module path is github.com/go-monolith/ghtmx; the runtime package is ghtmx and generated code calls ghtmxruntime (ghtmx/runtime). Migration: replace github.com/a-h/templ imports with github.com/go-monolith/ghtmx and rename .templ files to .ghtmx.
  • Generated files use the ghtmx_7f3b9d1a_ variable prefix and the // Code generated by ghtmx - DO NOT EDIT. header. Migration: delete old *_templ.go files and run ghtmx generate.
  • Dev-mode environment variables are GHTMX_DEV_MODE*; the live-reload reserved path is /_ghtmx/reload/. Migration: rename any TEMPL_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 are GHTMX-E0602, arbitrary expressions GHTMX-E0601. Migration: bind a handler symbol (hx-post={ handlers.CreateUser }) or a generated constructor (hx-get={ ghtmxgen.GetUser(id) }); see CONFORMANCE.md.
  • Rendering no longer flushes the underlying http.Flusher after every component (upstream forced chunked encoding and early header commit). Migration: none for typical apps; for deliberate streaming, render a ghtmx.Flush() component where a flush is wanted.

Removed (vs. upstream templ)

  • The runtime fragment API (templ.Fragment, RenderFragments, WithFragments): replaced by compile-time fragment declarations with dual generated entry points (upcoming milestone). Migration: declare a fragment in the template and call its generated ...Fragment entry point.
  • The Prettier integration in fmt and the test suite (-prettier-command, -prettier-required flags): ghtmx has no Node.js dependency anywhere in the toolchain. Migration: none required; ghtmx fmt output no longer reformats <script>/<style> bodies via Prettier.
  • The legacy templ.WriteWatchModeString API is not carried over. Migration: none required; watch mode uses the dev-mode text sidecars automatically.
  • ghtmx.Class, ghtmx.SafeClass, and ghtmx.ConstantCSSClass are 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.