- Zola (static site generator)
- Rust toolchain with
wasm32-wasip1target - mdbook and mdbook-toc
- Node.js (for running tests)
- Python 3 (for
babel, used in l10n)
zola buildThe output is in public/.
To run a local dev server with live reload:
zola serveThe coreutils man pages and documentation are generated from the coreutils source code, not maintained in this repository. The CI workflow handles this automatically, but here is how it works:
-
uudoc generates the mdbook source from the coreutils Rust source:
cd coreutils cargo run --bin uudoc --all-features -
TLDR examples are downloaded and bundled into the docs:
curl -sfL https://github.com/tldr-pages/tldr/releases/download/v2.3/tldr-pages.zip -o tldr.zip
-
mdbook builds the HTML documentation:
cd coreutils/docs mdbook build -
Translations are built by
scripts/build-docs-l10n.sh, which swaps locale.ftlfiles and rebuilds uudoc + mdbook for each language. -
Language selector is patched into the mdbook theme by
scripts/patch-mdbook-theme.sh.
The generated docs are deployed at /coreutils/docs/ and /findutils/docs/ on the site.
The playground lets visitors run uutils coreutils commands in the browser via WebAssembly.
rustup target add wasm32-wasip1
cd /path/to/coreutils
cargo build --release --target wasm32-wasip1 -p coreutils --no-default-features --features feat_wasm
cp target/wasm32-wasip1/release/coreutils.wasm /path/to/uutils.github.io/static/wasm/uutils.wasmNot all coreutils compile to WASI — the feat_wasm feature set includes the compatible subset. Commands like ls, sort, head, tail, and tr are excluded because they depend on platform-specific syscalls.
static/js/wasm-terminal.js— main playground runtime (xterm.js +@bjorn3/browser_wasi_shim)static/js/wasm-example.js— inline "Run" button handler for shortcodestemplates/shortcodes/wasm_example.html— Zola shortcode for embedding runnable examplescontent/playground.md— the playground page
When the WASM binary is not available, the playground falls back to JavaScript implementations of common commands.
The playground has unit tests in static/js/wasm-terminal.test.html. To run them:
npm install puppeteer # one-time setup
node scripts/run-tests.js --dir staticOr after a full site build:
node scripts/run-tests.js --dir publicThe test runner starts a local HTTP server, opens the test page in headless Chrome via Puppeteer, and reports pass/fail counts. This is the same script used in CI.
The GitHub Actions workflow (.github/workflows/website.yml) does the following:
- Checks out
uutils.github.io,coreutils,coreutils-l10n, andfindutils - Copies l10n locale files into the coreutils tree
- Builds coreutils documentation (English + translations) with uudoc + mdbook
- Builds findutils documentation with mdbook
- Builds the WASM binary (
feat_wasmfeature set) - Builds the Zola site
- Runs the playground JS tests
- Deploys to GitHub Pages (on push to main or scheduled builds)