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. You can 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 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 merges, future updates might 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 more basic workflow, you can make small edits directly in GitHub’s web interface.
-
Add a new page
- Go to the
docs/contentdirectory. - 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
For larger, more significant changes to the docs, clone the documentation locally. See Sui Environment Setup for instructions on forking and cloning the Sui repository. The docs/content directory contains the documentation.
- 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/contentdirectory. - 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/sitedirectory. - Install dependencies (if you don’t have
pnpminstalled, see the pnpm installation guide):pnpm install - Start the local dev server:
pnpm start - Open
http://localhost:3000to verify your updates.
- Navigate to the
Review process
When your changes are ready:
- Submit a PR to the
mainbranch of the Sui repository. - Vercel generates a preview so you can verify your changes. The preview is what you can expect to see online after your changes merge.
- Reviewers 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 merges into
main, and your contribution goes live. Changes appear on the live website within 5-10 minutes after the PR has merged intomain.