Architecture overview
The documentation flow
Upstream source (bazel.build)
The canonical source for Bazel documentation lives in the bazelbuild/bazel repository:- Narrative documentation:
.mdfiles in thesite/en/directory - Reference documentation: Generated from code comments in the Bazel codebase
Automated synchronization
A GitHub Actions workflow (.github/workflows/pull-from-bazel-build.yml) syncs the upstream repository periodically:
- Initializes the
upstreamgit submodule pointing to bazelbuild/bazel - Builds reference documentation from the Bazel codebase
- Runs
copy-upstream-docs.shto copy and transform files - Uses
transform-docs.awkto convert.mdfiles to Mintlify-compatible.mdxformat - Updates
docs.jsonwith versioned navigation structures - Commits and pushes changes to this repository
- Automatically when Dependabot updates the upstream submodule
- Manually via workflow dispatch
- On pull requests to preview changes
Documentation transformation
The transformation process adapts upstream documentation for Mintlify: File conversion (.md → .mdx):
- Converts HTML tags to Mintlify components
- Transforms anchor references (underscores to dashes)
- Adds frontmatter for Mintlify
- Preserves code examples and syntax highlighting
- Upstream uses
_index.yamlfiles for navigation - This fork uses
docs.json(Mintlify format) - Navigation changes must be manually applied to maintain consistency
Preview and deployment (bazel.online)
Once changes merge into this repository:- Preview: Pull requests generate preview deployments via Mintlify automatically
- Production: Merges to
maindeploy to bazel.online - Versioned docs: Multiple Bazel versions are maintained (6.5.0, 7.6.1, 8.x.x, etc.)
Contributing documentation
Making changes
For narrative documentation:- Make your changes in the bazelbuild/bazel repository
- Edit files in the
site/en/directory - Create a pull request following the upstream contribution guidelines
- Once merged, your changes sync to bazel.online automatically
- Update code comments in the relevant Bazel source files
- The build process extracts and formats the documentation automatically
Local-only files
Some files live only in this repository and don’t sync from upstream:index.mdx(homepage)docs.json(navigation configuration)- Files listed in the
LOCAL_FILESvariable incopy-upstream-docs.sh
Seeing your changes
During development
Upstream PR preview:- When you create a PR in bazelbuild/bazel, changes don’t appear on bazel.online yet
- Review the Markdown files in the GitHub PR interface
- Ensure your documentation follows Markdown best practices
- After your upstream changes sync here, a PR is created automatically
- Mintlify generates a preview deployment for the PR
- You can review the rendered documentation on bazel.online’s preview URL
After merging
Timeline:- Your PR merges to bazelbuild/bazel (bazel.build)
- Dependabot detects the upstream changes (runs periodically)
- Automation creates a PR in this repository
- After review and merge, changes deploy to bazel.online (typically within minutes)
- Visit bazel.online to see your published changes
- Check both current version and versioned documentation paths
- Use the site search to find your updated content
Troubleshooting
My upstream PR merged but I don’t see it on bazel.online
The sync process runs periodically via Dependabot. It may take time for:- Dependabot to detect upstream changes
- The sync PR to be created and reviewed
- The changes to be merged and deployed
The documentation looks different on bazel.online
The transformation process converts Markdown to Mintlify-flavored MDX. Some differences are expected:- HTML tags convert to Mintlify components (for example,
<aside>→<Note>) - Navigation structure adapts to Mintlify’s format
- Anchors use dashes instead of underscores
I need to fix something urgently
For urgent fixes to bazel.online:- Create a PR directly in this repository (alan707/bazel-docs)
- Your changes may be overwritten on the next upstream sync
- Make the same changes upstream to preserve them long-term
Contributing to this pipeline
To improve the documentation pipeline itself:- Transformation logic: Edit
transform-docs.awk - Copy process: Modify
copy-upstream-docs.sh - Automation workflow: Update
.github/workflows/pull-from-bazel-build.yml - Navigation structure: Edit
docs.json
Questions or issues?
- Upstream documentation issues: File in bazelbuild/bazel
- bazel.online specific issues: File in alan707/bazel-docs
- General help: Join the Bazel Slack and ask in #documentation