Thank you for considering contributing. This guide will help you get set up and submit changes.
For environment setup and local tooling commands, use README.md. CONTRIBUTING.md focuses on contribution workflow and review expectations.
Berachain has adopted the Contributor Covenant as its Code of Conduct. We expect everyone to follow it. Please read CODE_OF_CONDUCT.md before contributing.
All work happens on GitHub. Core team and community contributors both submit pull requests to the same main branch and go through the same review process. We do not use long-lived feature branches; everything targets main.
We use GitHub Issues for bugs and documentation suggestions. Before opening a new issue, search existing issues to avoid duplicates.
When reporting a problem, please include:
- What you expected vs what you saw
- Where in the docs (URL or path) it occurs
- Your environment if relevant (e.g. browser, OS)
For small fixes (typos, single-sentence clarifications), you can open a PR directly; for larger changes, opening an issue first helps us align before you invest time.
Please do not report security vulnerabilities in public issues. Report them privately (e.g. via Discord to the team or through a private channel the project provides). We’ll acknowledge and work with you on a fix before any public disclosure.
If you want to change structure, add a new section, or rework a big part of the docs, we recommend opening an issue first. That way we can agree on the approach before you do a lot of work. For typos and small fixes, a direct PR is fine.
New to open source or to this repo?
- Find an open issue (or open one if your idea isn’t listed).
- Comment that you’d like to work on it so others don’t duplicate effort.
- Follow the Development Workflow below and open a PR.
You can also learn from this free series: How to Contribute to an Open Source Project on GitHub.
- Fork the repo on GitHub: berachain/docs.
- Clone your fork and add upstream:
git clone https://github.com/YOUR_USERNAME/docs
cd docs
git remote add upstream https://github.com/berachain/docsUse the setup and local run instructions in README.md.
Work on a branch (do not commit directly to main):
git checkout -b fix/your-change # or feature/your-feature- Editing: Open the relevant
.mdxfile undergeneral/,build/, orreference/and edit. - New page: Create the
.mdxfile in the right folder, then add it todocs.json(see Adding or moving pages).
Use existing pages as a style reference. Prefer clear, concise language and short paragraphs. Use MDX components where they add value (see Content guidelines).
Navigation is defined in docs.json under navigation.tabs. Each tab has groups; each group has a group name and a pages array of file paths (without .mdx).
To add a new page:
- Create the file, e.g.
build/bex/guides/my-new-guide.mdx. - In
docs.json, find the right tab and group and add the path topages:
"pages": [
"build/bex/guides/pool-creation",
"build/bex/guides/my-new-guide"
]To move or rename a page, update both the file path and every reference in docs.json and in other docs (links).
- Follow the structure and tone of existing docs.
- Use US English spelling in prose (
color,behavior,favor,labeled). - Use Mintlify/MDX components where appropriate, e.g.
<Card>,<Steps>,<Note>,<Tip>,<Warning>. - Use fenced code blocks with a language tag where you show code.
- Link to related pages when it helps the reader.
- Validate your changes locally (see README.md for commands).
Before opening a PR, run:
mint validateAlso run:
mint broken-links
mint a11yFix any errors before opening your PR.
Contract addresses are managed through a single source of truth:
data/contracts.json
Do not manually edit generated canonical address pages. Instead:
node scripts/contracts/generate-pages.mjsThis regenerates:
- snippets in
snippets/contracts/generated/ - canonical deployed-contract pages in:
build/getting-started/deployed-contracts.mdxbuild/bex/deployed-contracts.mdxbuild/bend/deployed-contracts.mdxbuild/bend/deployed-markets.mdx
Check in generated outputs with your data/contracts.json changes in the same PR.
At the moment this generation step is manual (not CI-enforced), so treat regeneration + check-in as required whenever contract data changes.
- Commit with a clear message, e.g.
Fix typo in BEX swap guideorAdd section on pool exits. - Keep the scope of each PR focused (one topic or one section is ideal).
git add .
git commit -m "Your message"
git push origin fix/your-change- Open a PR from your branch to
berachain/docsmain. - Fill in the PR template (description, checklist).
- If your PR fixes an issue, add “Closes #123” in the description.
- Allow maintainers to edit your branch (checkbox on the PR).
- Ensure your fork is up to date with
upstream/mainbefore or during review (e.g.git fetch upstream && git merge upstream/main).
Maintainers will review and either merge, request changes, or close with an explanation. We’ll do our best to respond in a timely way.
- You can delete your branch and pull the latest
mainfrom upstream. - Thank you for contributing; it helps the whole community.
By contributing, you agree that your contributions will be licensed under the same MIT License as this project.