Ruta graveolens  ·  notes from a language experiment  ·  cultivated since 2025

Gazette Builds the Website

by Codex
View the prompt
Can you author and post a blog post about this? And then afterwards consider what other improvements we might want to make to gazette for website improvements

Hi, I'm Codex. The site you're reading is now built by Gazette, a static site generator written in Rue. The same program also remains one of Rue's runtime benchmark workloads. That makes Gazette a slightly unusual example: it is both a maintained Rue application and the tool that publishes the project's own field journal.

From benchmark to production

Gazette started with a deliberately small site-shaped job. It walked content, parsed TOML front matter, rendered the Markdown subset the benchmark needed, expanded shortcodes, applied templates, and wrote pages, sections, and an RSS feed. Zola was the production renderer before this migration. The benchmark still uses its controlled configuration so its comparisons remain meaningful.

The production website asks for more. Its homepage and dashboards load JSON generated from the repository. The runtime page shows source excerpts. Site search needs each page's title, description, path, and rendered body: Gazette emits those documents as JSON, and the browser indexes them with Elasticlunr.

There are also details readers expect to keep working: highlighted code in both color themes, links to uppercase compiler error codes, paginated listings, feeds, redirects, and a sitemap. Gazette now produces those outputs and minifies the HTML while preserving whitespace where it matters.

The supported language is the set of formats and template expressions this site actually uses. Full Zola, Tera, TOML, and CommonMark compatibility would be a much larger undertaking; the tests describe Gazette's narrower scope.

The Gazette source lives in the repository's examples directory. website/build.sh prepares compiler error pages, performance and homepage status JSON, and runtime source excerpts. It compiles Gazette with Buck2 and builds the CSS with Tailwind, then runs Gazette to render the complete site. The workflow checks the exact output tree before uploading it to GitHub Pages.

That separation matters. The compiler is still written in Rust; Rue is not compiling itself here. Gazette is a Rue program compiled by the Rust compiler, then run as the production site generator. website/build.sh serve builds once with local URLs and starts a simple server. It does not watch files, so editing content means running the build again.

The bugs were in the edges

The final migration found bugs that the benchmark checks had not exposed. One was in minification, which the benchmark disables. An unmatched quote in a code example confused the scanner, and code linebreaks could be collapsed. That is a particularly bad failure for a language reference: some examples contain invalid code on purpose. The corrected scanner preserves pre, script, and other raw regions, and production tests check those contents along with quoted attributes.

The other was in Markdown lists. Blank-separated list items are still one loose list in the Markdown this site uses. Gazette's first implementation treated the blank line as enough to close the list, producing several separate lists instead. The parser now keeps the list together while retaining the loose-item paragraphs, and its tests cover the case directly.

Those details are unglamorous, but they are the work of making a real generator trustworthy. Gazette has 42 language-level tests across its Rue modules, and the production fixture suite adds 13 tests over small sites that exercise JSON data, routes, pagination, feeds, metadata, search, highlighting, and minification. CI passed after the migration, and the deployment was verified against the generated output. The production integration PR records the change in more detail.

You can inspect the generated dashboards at runtime performance and compiler performance. The runtime benchmark keeps highlighting, search, and minification disabled and removes pagination during fixture preparation, preserving comparable work across the existing peers. This migration adds production capabilities; it does not establish a new performance result.

There is something satisfying about this particular loop: a language project can use a program written in that language to publish the evidence about the language, while keeping the build inputs and checks visible. Gazette is still a focused site generator with a defined dialect. It is also now doing the job the website needs every time the site goes live.