This folder contains the build scripts that generate all HTML detail pages and site/data/snippets.json from the JSON source files in content/.
| File | Description |
|---|---|
generate.java |
JBang script (Java 25) — primary generator |
generate.py |
Python equivalent — produces identical output |
generate.jar |
Pre-built fat JAR (no JBang/JDK setup needed) |
build-cds.sh |
Script to build a platform-specific AOT cache |
java -jar html-generators/generate.jarRequires only a Java 25+ runtime — no JBang installation needed.
# One-time: build the AOT cache (~21 MB, platform-specific)
./html-generators/build-cds.sh
# Subsequent runs use the cache
java -XX:AOTCache=html-generators/generate.aot -jar html-generators/generate.jarThe AOT cache (Java 25, JEP 514/515) pre-loads classes from a training run, reducing startup time by ~30%. The cache is platform-specific and is not committed to git — regenerate it after changing the JAR or JDK version.
jbang html-generators/generate.javaRequires JBang and Java 25+.
python3 html-generators/generate.pyRequires Python 3.8+.
After modifying generate.java, rebuild the fat JAR:
jbang export fatjar --output html-generators/generate.jar html-generators/generate.javaThis produces a self-contained ~2.2 MB JAR with all dependencies (Jackson) bundled. The build-generator.yml GitHub Action does this automatically when generate.java changes.
Two GitHub Actions workflows automate the build and deploy pipeline:
-
build-generator.yml— Triggered whengenerate.javachanges onmain. Uses JBang to rebuild the fat JAR and commits the updatedgenerate.jarback to the repository. -
deploy.yml— Triggered when content, templates, the JAR, or site assets change onmain. Runsjava -jar html-generators/generate.jarto regenerate all HTML pages,snippets.json, andindex.html, then deploys thesite/folder to GitHub Pages.
This means the deploy workflow always uses the pre-built fat JAR (no JBang required at deploy time), and the JAR stays in sync with the source automatically.
See BENCHMARK.md for performance comparisons across all four execution methods (AOT, fat JAR, JBang, Python).