ferravex
GitHub

Build the documentation site locally

The Ferravex site is generated from repository Markdown, crate READMEs and the first-party example catalog. Python's standard library builds the pages; the browser uses Ferravex CSS/JavaScript plus the explicitly requested, self-hosted Qikbar command menu. What has shipped, and its verification limits, is recorded in the release scope. Building this site creates local artifacts; publishing remains a separate step.

Build and inspect

python3 scripts/build-site.py
python3 -B scripts/test_site.py
python3 scripts/serve-site.py --port 8080

Open http://127.0.0.1:8080/. The build audits the workspace, compiles all catalog examples for WebAssembly, stages their original hosts and shared runtime, generates first-party Rust API documentation and writes dist/site. Web, API and site output are rebuilt from clean directories so stale adapters and loaders cannot survive. No external runtime packages are fetched.

For content-only changes after a complete local build:

python3 scripts/build-site.py --skip-build

This requires matching game and API artifacts and still runs the dependency audit. A successful content build does not establish gameplay correctness, browser input support or device performance; use the example validation guide separately.

Hosting configuration

Coolify builds the repository's Dockerfile from main after receiving a signed GitHub push webhook. The image builds WebAssembly and API documentation, then serves the generated site with the Python server. It accepts PORT and exposes /healthz.

Confirm the commit in Coolify, then check /healthz and the served game manifest on ferravex.com. Toolchains and container base images are used for hosting. The packaged game runtime retains its first-party dependencies.

Add an example

Add a first-party workspace crate and a browser host, then record its id, host directory, title, controls, description, source and screenshot in examples/catalog.json. The Wasm file uses the package name with hyphens replaced by underscores. The catalog drives staging, documentation pages and size reports. Keep every Cargo dependency within the workspace and original source tree. On the site, each example page also reads its objective and related guide from GAME_GUIDES, and its gallery genre from GAME_GENRE, in scripts/build-site.py; a game without entries falls back to its catalog description and the Arcade genre.

The restored games share web/runtime.js; Courtyard and Orbit Breaker keep their specialized hosts. Example pages instantiate only the selected game after Play is pressed. The gallery does not download or run any game module automatically.

Gameplay media

The site is built around short gameplay loops and stills recorded from the real browser builds. They are committed under docs/media/<game-id>/ (loop.mp4, poster.webp, still-N.webp and a media.json manifest with alt text), plus docs/media/post/ for the post-processing comparison. build-site.py and the Docker build only copy these files; they never record or encode media.

Maintainers regenerate them with a separate tool:

python3 -B scripts/build-web.py release
node scripts/capture-media.mjs record --jobs 4
node scripts/capture-media.mjs encode
node scripts/capture-media.mjs post

The tool needs Node 22 or newer, Google Chrome or Chromium with working GPU WebGL2, and ffmpeg built with libx264 and libwebp. These are maintainer-only requirements, not site, game or engine dependencies. record plays each game's ?autoplay demonstration (or a short scripted input for Courtyard and Orbit Breaker) in headless Chrome and saves a raw session plus a contact sheet in target/media-capture/. encode cuts each loop and its stills at the timings in the script's SHOTS table. Timings can drift between recordings, so check every contact sheet, loop and still before committing. Keep each loop under 450 KiB and total media within an average of 640 KiB per catalog entry; python3 -B scripts/build-site.py --self-test checks both limits. Use --only mosslight,signalbox to capture selected games and --directory target/games20/web to read an isolated staging directory. A filtered all capture leaves unrelated game media alone.

Pages load posters first. site.js creates a muted <video> only for loops that are visible, hovered or centered on touch screens. At most four play at once (two on phones), and none autoplay when reduced motion or Save-Data is on, or after a visitor pauses motion.

Update documentation

Edit the relevant Markdown or crate README. Search, navigation and sitemap pages are regenerated. Keep support claims aligned with implementation and actual local test reports. Do not describe historical screenshots, measurements or external-backend test runs as evidence for the recovered runtime.

Search the whole site

Command K on macOS or Control K on other systems opens Qikbar. The visible header trigger also works on touch devices. The shortcut stays available while an embedded example game has keyboard focus. Search covers whole guides, individual guide headings, every example README, public Rust types/functions and locally defined API methods. Results link directly to their section or symbol. Generated Rustdoc pages include the same site-wide command menu alongside their native API search.

The shared corpus is generated into search.json from the current rendered pages and documentation. It loads only when the menu is opened, stays in memory for that page visit, and is searched locally. Source requests are debounced and canceled as the query changes. Failed index loads can be retried without reloading the page.

website/static/vendor/qikbar contains the official Qikbar 0.2.1 ESM distribution and license. No CDN or package installation is needed to build or use the site. To update it, replace the pinned official browser modules and chunks together, preserve the license, refresh the provenance manifest hashes, and run the search/browser checks. See the dependency policy for its separate website scope.

python3 -B scripts/test_search.py
node website/tests/search.mjs