Website Maintenance¶
The website uses one documentation tree, docs/. Sphinx renders Markdown and
the Python API; cargo doc supplies the Rust API. The browser editor is built
separately and assembled with those outputs.
Build and preview¶
Use the development tools
and WebAssembly setup from the installation page. The Bevy CLI version and
build environment are pinned in .github/workflows/site-build.yml.
just site-docs # fast documentation preview
just site-preview # serve target/site on port 8000
Local path |
Content |
|---|---|
|
Homepage in the development documentation version |
|
Development documentation |
|
Current browser editor |
Before publishing, assemble and check the complete site:
just site
just site-check
A local editor bundle can be reused when it matches the checked-out source:
just site --editor-bundle target/bevy_web/web-release/bloq_editor
Output stays under target/site/. The checker verifies local links, anchors,
assets, version metadata, and accidental private/build-host paths. Reused WASM
must carry the same host-path remapping as the normal editor build.
Maintain the chapters¶
Edit chapter sources in docs/. Update docs/index.md for site navigation and
docs/user-guide.md for the User Guide’s chapter order.
Explain current behavior with short prose, tables, and diagrams.
Keep runnable examples in
docs/examples/and include them withliteralinclude.After API or IR changes, rerun affected examples in temporary directories. Validate saved IR and refresh its downloads, captured output, and diagrams together.
Use these directives for illustrations:
Directive or option |
Use |
|---|---|
|
Interactive block graph from a gallery entry, or a BLOG file with |
|
Show module ownership |
|
Show a correlation surface from a Pauli word over lexicographically sorted Ports |
|
Show a named measurement’s correlation surface |
|
Expose the surface through selected face directions |
|
Embed a generated physical-construction diagram |
Correlation overlays show support. Named-measurement illustrations project structural branches to their true arms. See Update visual assets for regeneration tools.
Generate the API references¶
Python signatures come from generated stubs and docstrings from the bindings.
The functional reference in docs/api/python.rst lists each public export once;
bloq_py/tests/test_docs.py checks that coverage.
just py-stub # after changing binding annotations
just py-docs # rebuild canonical Sphinx sources
just doc-check # check public Rust documentation
Old Python per-object URLs redirect to inline API anchors, preserving method fragments. Do not hand-edit generated stubs or duplicate binding docstrings.
Retain release versions¶
URL |
Source |
|---|---|
|
Working development source |
|
An existing, immutable release tag |
|
A selected retained release snapshot |
just site --tag TAG
just site --stable TAG
Replace TAG with an existing release tag. Tagged prose, Python bindings, and
Rust API are built from that same checkout. An existing snapshot cannot be
replaced by a different commit. versions.json records each version’s source
and pages; the selector retains the current page when it exists in the target.
The gh-pages branch retains release directories. Preserve those directories
when assembling a new version. The hosted editor shows its own current version;
historical documentation does not select a historical editor build.
Publish a reviewed build¶
CI produces a validated bloq-site-preview artifact for website changes.
Every push to main builds and publishes the development documentation and
browser editor. PR builds produce previews only. Publishing reuses the built
artifact and preserves retained release snapshots and the stable alias.
For a manual publication, run the website workflow with publish enabled;
optional release_tag adds a release snapshot and make_stable selects it.
Package releases are separate; see Releases.
Important
Review the assembled site before changing the deployed version. Keep previous release snapshots when publishing.
The workflow restores retained snapshots, builds the new tree, and deploys that
same tree to GitHub Pages. Domain and HTTPS settings belong to repository
maintainers; the generated CNAME names bloqec.com.
Update visual assets¶
Site styling lives in docs/_static/site.css; logo sources live in
docs/assets/logos/. Use bloq-view for interactive graphs and the public IR
export API for dependency diagrams.
Asset |
Generator |
|---|---|
Blocks and Pipes thumbnails |
|
Gallery pages and thumbnails |
|
2D companions to paper figures |
|
Retained tutorial plots |
|
Physical construction diagrams |
|
Run the thumbnail and gallery generators with
uv run --project bloq_py --no-sync python <script>.
Before generating gallery thumbnails, build the editor with
cargo build -p bloq_editor --locked. Use the generator’s --editor option
to select another binary.
Keep experiment settings beside their results, and record source URLs and
hashes in docs/assets/source-provenance.json. Replot retained statistical data
without resampling. Historical circuit bundles keep their original circuits
and metadata for replay.
To regenerate the THTH occupation figure, use the settings in its saved caption. Update its SVG, interval CSV, caption, and provenance hashes together.