bazel-contrib/bazel-docs controls navigation, which is a separate repo from where doc content lives (bazelbuild/bazel).
How navigation works
docs.json in bazel-contrib/bazel-docs
defines the Bazel docs sidebar. Mintlify reads this file to build the
left-hand navigation tree.
docs.json contains a navigation array of groups, each with a list of pages:
pages is a root-relative path to an .mdx file, without the
.mdx extension.
Prerequisites
- A fork of
bazel-contrib/bazel-docs - The Mintlify CLI for local validation
Add a page to an existing group
-
Clone your fork of
bazel-contrib/bazel-docsand add the upstream remote: -
Check out a new branch:
-
Open
docs.jsonand find the group where your page belongs. Add the path to thepagesarray: -
Validate that
docs.jsonis well-formed:Run this from thebazel-docsroot (wheredocs.jsonlives). -
Commit and open a PR against
bazel-contrib/bazel-docsmain:Open a pull request targetingbazel-contrib/bazel-docsmain.
Add a new navigation group
If your new page does not fit into any existing group, add a new group object to thenavigation array in docs.json:
Getting help
If you are unsure where a page belongs, ask in the#documentation channel on
the Bazel community Slack or open an issue in
bazel-contrib/bazel-docs.