Contributing to this documentation¶
Simulation user Operator developer Framework developer
The sources are in https://github.com/Collab4exaNBody/doc_onika, in
Markdown under docs/, built with Zensical.
The navigation is defined in zensical.toml (nav entry).
Build locally¶
$ python3 -m venv .venv && source .venv/bin/activate
$ pip install zensical==0.0.71 # version used by the CI
$ zensical serve # live preview on http://localhost:8000
$ zensical build --strict # static site in site/, warnings are errors
--strict turns warnings (broken links, missing pages) into errors, as in the CI: fix them before pushing.
Page conventions¶
- Pages are grouped in directories:
discover,getting-started,inputs,running,operators,libraries,coupling,python,reference. The navigation sections are defined innavofzensical.toml, where each new page must also be added. - Link to other pages with relative paths to the
.mdfile, e.g.[operator anatomy](../operators/anatomy.md). Give important sections an explicit anchor,## Batches { #msp-batches }, and link to it with../inputs/msp-language.md#msp-batches, so that titles can change without breaking links. -
Under the title, badges tell who the page is for:
-
Examples must be run against a real Onika build before being documented. Copy the real output.
- Diagrams use Mermaid (a
mermaidfenced code block), no image files needed. Images go indocs/img/. - Notes and warnings are admonitions (
!!! note,!!! warning), alternatives are content tabs (=== "Spack"), see the Zensical authoring guide.
Published versions and previews¶
The website currently publishes only the main branch. It is built by
scripts/build_versions.sh into /main/, and the site root redirects to it.
The same setup can publish other branches side by side, with a version
selector in the header. This is optional and not used today. The list of
published branches is DOC_BRANCHES in .github/workflows/docs.yml; the
first one is the default version.
To publish a preview of a branch for colleagues:
- Push your branch.
- Add it to
DOC_BRANCHESin.github/workflows/docs.yml, onmainand on your branch. - The
Documentationworkflow rebuilds and deploys the whole site.
To check a multi-branch site locally (optional):