Skip to main content
Add a new page to the Bazel docs sidebar, or reorganize existing navigation groups. 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:
Each entry in pages is a root-relative path to an .mdx file, without the .mdx extension.

Prerequisites

Add a page to an existing group

  1. Clone your fork of bazel-contrib/bazel-docs and add the upstream remote:
  2. Check out a new branch:
  3. Open docs.json and find the group where your page belongs. Add the path to the pages array:
  4. Validate that docs.json is well-formed:
    Run this from the bazel-docs root (where docs.json lives).
  5. Commit and open a PR against bazel-contrib/bazel-docs main:
    Open a pull request targeting bazel-contrib/bazel-docs main.

Add a new navigation group

If your new page does not fit into any existing group, add a new group object to the navigation array in docs.json:
Position it in the array where you want it to appear in the sidebar.

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.