Getting started
rinx runs as part of a Bazel build. You need Bazel 8 or 9 (preferably through Bazelisk) and a C compiler for linking the Rust binary. Everything else, including the Rust, Java and Python toolchains, is fetched by Bazel.
Adding rinx to a project
Add rinx to your MODULE.bazel:
To follow an unreleased commit instead, override it with the repository:
A first site
Write two documents. index.rst is the root of the site, and its toctree
pulls in the second one:
Then declare them in a BUILD.bazel next to them:
rinx_library parses its documents. rinx_site indexes everything its
libraries bring in and renders one HTML page per document.
Building and viewing it
The site is written to bazel-bin/site_site_out/, where site is the
target's name. Open its index.html, or serve the directory:
A broken cross-reference is a warning by default. Set strict_links = True
on the site to make it fail the build instead.
Where to go next
Bazel rules lists every attribute of the four rules. Among them are
parse_datafor the files.. include::reads,images,diagrams = Truefor PlantUML, and doctests.Supported syntax lists which reStructuredText and Sphinx constructs rinx understands.
To split documentation between teams, give each team a
rinx_libraryand list it in thedepsof the library whose toctree includes it. The example site is built exactly that way.To give the site its own name and look, use the site's
config,templateandcssattributes.