Contribute to Sui Documentation
The Sui documentation is open source and thrives on community contributions. Whether you’re fixing a typo, clarifying explanations, or adding entirely new content, your work benefits the whole community. This page explains how to contribute to the documentation using either GitHub’s web editor or your local development environment.
Follow the style guide
All documentation changes must follow the Sui style guide. Reviewers will provide feedback to ensure consistency in tone and quality. Don’t be discouraged if your pull request (PR) receives multiple review comments, as this process helps maintain clarity and uniformity across all docs. After your PR is merged, future updates may refine your content further.
When writing, keep these key principles in mind:
- Use active voice.
- Write in present tense.
- Be clear and concise. Use only as many words as needed.
GitHub web editor
If you’re new to Git or prefer a simpler workflow, you can make small edits directly in GitHub’s web interface.
-
Add a new page
- Go to the
docs/content
directory. - Open the relevant subdirectory.
- Click Add file → Create new file.
- Write your content and commit your changes.
- Go to the
-
Edit an existing page
- From the documentation website, you can use the "Edit this page" link at the bottom of each documentation page.
- From GitHub, navigate to the file you want to update. Click the pencil icon in the top-right.
- Make your edits and commit them.
Set up a local environment
Cloning the documentation locally is recommended when you are creating larger, more significant changes to the docs. See Sui Environment Setup for instructions on forking and cloning the Sui repository. Documentation is located in the docs/content
directory.
- Install dependencies
- If you use Visual Studio Code, install the Prettier extension to keep formatting consistent.
- Make your changes
- Edit or add files in the
docs/content
directory. - Stage and commit changes:
git add .
git commit -m "Describe your changes"
git push
- Edit or add files in the
- Preview locally
- Navigate to the
docs/site
directory. - Install dependencies (If you don’t have
pnpm
installed, see the pnpm installation guide):pnpm install
- Start the local dev server:
pnpm start
- Open
http://localhost:3000
to verify your updates.
- Navigate to the
Review process
When your changes are ready:
- Submit a PR to the
main
branch of the Sui repository. - A Vercel preview will be generated so you can verify your changes. The preview is what you can expect to see online after your changes have been merged.
- Reviewers will provide feedback. It’s your responsibility to update your PR based on their comments. Multiple reviewers might give input.
- After at least one reviewer approves your PR, it gets merged into
main
, and your contribution goes live. Changes are reflected on the live website within 5-10 minutes after the PR has merged intomain
.