Skip to content

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 15:50
· 5 commits to main since this release

Zest SSG v0.7.0 — Release Notes

Released: September 11, 2026
Range: 0.6.1 → 0.7.0 (11 commits, 78 files changed, +4,494 / −2,781)

This release is a major internal reorganization and a substantial build-performance push, alongside meaningful template-engine parity work. Highlights include batched F# layout evaluation, lock-safe atomic output writes, a template-aware incremental cache, an enable_html_minification switch, and full directory restructurings of the DSL, ZCSS, Nunjucks, and Handlebars subsystems.


Breaking Changes

  • the project tagline is now "Zest: Easy Static-site Toolkit" (previously "Zealous Efficient Static Toolkit"). Package metadata, README, and zest.toml were updated.

Performance

  • Batched F# layout evaluation. Taxonomy and pagination generators previously entered FSI once per generated page (e.g. once per tag — ~25 round-trips per build). Layouts are now applied to all pages in a single batched FSI run per layout-chain level, cutting the dominant build cost. Failed tasks are retried individually so one bad page never loses its siblings.
  • Two-phase content write. The content pipeline now partitions results into cached and rebuild pages first, applies layouts in one batched pass, then post-processes (format/minify) and writes in parallel. This removed the per-page FSI re-entry that dominated large builds.
  • Parallel asset post-processing. CSS/JS formatting and minification now enumerate files once and process them with Parallel.ForEach.
  • Template-aware incremental cache. A content hash over every layout and include (computeTemplateSignature) invalidates the page cache when templates are edited, added, or deleted — while unchanged templates keep per-page reuse intact for fast incremental builds.
  • Includes mtime from single traversal. The second directory sweep for includes was eliminated; LayoutEngine.getLastIncludesMtime() now reuses the traversal already done by loadIncludes.
  • F# context caching. Zest.Dsl.Context.ensure caches the parsed context by (path, mtime), so repeated FSI evaluations within one build no longer re-read the JSON context file. Stale contexts are never served across builds.
  • Reference-equality context cache. The Nunjucks site-context cache now keys on Object.ReferenceEquals for both globalData and SiteConfig instead of hash codes, eliminating accidental cache collisions.
  • Build phase timing. The build engine and content pipeline now emit [Zest][timing] lines for setup-init, fsi-cold-start, content-pipeline, taxonomy, pagination, assets-copy, asset-format, and sub-phases (content-batchlayout, html-format, html-minify, content-write, taxonomy-render, pagination-batchlayout, etc.), making long builds attributable to a specific stage.
  • Streaming FSI I/O. FSI stdout/stderr collection moved from ConcurrentQueue to BlockingCollection, giving the reader a proper blocking wait (TryTake(&line, 10)) instead of Thread.Sleep 10 polling.

Build Reliability

  • New AtomicFile module. Output writes go to a unique sibling temp file and are then File.Move'd over the target with a bounded retry. This lets the preview/dev server's open read handles finish on the old file while new requests see the new one, and absorbs transient locks from antivirus scanners and editors. Used by the content pipeline, taxonomy generator, pagination generator, and asset post-processing.
  • Preview server reads with FileShare.Delete. HttpServer now reads HTML and compressed assets through ReadAllTextWithDeleteShareAsync / ReadAllBytesWithDeleteShareAsync, so a concurrent atomic rename can swap the file under an in-flight response.
  • In-flight request tracking. HttpServer tracks fire-and-forget request tasks and waits up to 5 seconds for them on Shutdown, instead of abandoning responses mid-write.
  • SSE/WebSocket broadcast no longer blocks the rebuild loop. DevServer, PreviewService, and SocketHub now snapshot the client list under the lock and write outside it, on a background task.
  • FSI child process is shut down on exit. One-shot builds (BuildController) and both serve modes (DevServer, PreviewService) now call FsiSession.shutdown(), so the long-running dotnet fsi child no longer holds the terminal open after Zest exits. Watch mode deliberately keeps it alive for reuse.
  • Non-blocking shutdown. FsiSession.shutdown() uses Monitor.TryEnter(sync, 500) and falls back to killing the process tree directly, so shutdown never blocks on a 60 s evaluation timeout.
  • Failed page writes no longer abort the build. Individual write failures in the content pipeline are collected as errors and reported, rather than propagating.

New Features

  • enable_html_minification. A new SiteConfig flag (default false), wired through ConfigLoader from _config.toml, [site], or [build] sections. HTML post-processing is split into its own phase with dedicated timing output; formatting takes priority when both flags are enabled.
  • HAML converter expanded:
    • #{expr} interpolation → {{ expr }}
    • !!! / !!! 5 / strict / frameset / transitional / 1.1 / basic / mobile / xml → correct DOCTYPE declarations
    • &= expr escaped output (alias of =)
    • Multi-line {...} attribute hashes joined until braces balance
    • Attribute values now run through renderInterp, so class="#{cls}" works
  • Liquid converter expanded:
    • forloop.parentloop captured into __parentloop before each nested loop
    • break / continue → Nunjucks equivalents
    • increment / decrement → set-based arithmetic with output
  • Pug converter expanded:
    • case / when / default → {% if %} / {% elif %} / {% else %} chains (when a, b becomes a or b equality tests)
    • while cond → bounded {% for __while_i in range(0, 100000) %} with immediate {% break %} (documented 100k iteration cap)
    • Attribute parsing now handles optional commas and keeps nested ()/[]/{} values intact
  • ITemplateEngine documented. Filter, tag, and render contracts are now specified with XML docs, including the concurrency requirement that Render be safe to call from parallel page workers.

Refactoring & Reorganization

The codebase was restructured into layered directories across four subsystems. All renames preserve public type names and namespaces, so external consumers are unaffected.

  • Zest.Dsl reorganized into Core/, Utility/, Css/, Sugar/, Html/, Data/, Metadata/, Migration/. Zest.Dsl.fsproj compile order rewritten to reflect the new dependency layers.
  • Zest.Engine/Zcss reorganized into Syntax/, Evaluation/, Parsing/, Builtins/, Compilation/, Tooling/.
  • NunjucksEngine.fs (1,610 lines) split into a dedicated NunjucksEngine/ directory: NunjucksTypes → NunjucksTokenizer → NunjucksCompiler → NunjucksEvaluator → NunjucksBlocks → NunjucksRenderer → NunjucksEntry.
  • HbsEngine.fs (575 lines) split into a dedicated HbsEngine/ directory: HbsTypes → HbsTokenizer → HbsParser → HbsContext → HbsRenderer → HbsEntry.
  • Engine entry files renamed to drop the redundant Engine suffix.
  • BuildCache.clearCache moved earlier in the module so a signature mismatch during load can discard a stale cache immediately.
  • Project references cleaned up in Zest.Dsl and Zest.Engine.

Documentation

  • README.md updated for the _init.zest.fsx rename and the new tagline; the Acknowledgements section was removed.
  • CLAUDE.md substantially revised (large diff).
  • Directory.Build.props version, assembly version, file version, description, and package tags updated to 0.7.0.
  • zest.toml [meta] version and header updated.

Internal Notes

  • New cache header shape: # zest-cache v3 | engine=<sig> | tpl=<sig>.
  • New build dependency: System.Threading / System.Threading.Tasks in BuildEngine.
  • ScriptRunner now deletes the previous per-build context file on resetSession, preventing %TEMP% accumulation across builds.

Full Changelog: v0.6.1...v0.7.0