Version: latest
How to Contribute Docs
This guide covers everything needed to contribute to the HAMi documentation website - from setting up the local environment to writing, previewing, and submitting changes.
The documentation site is built with Docusaurus 3 and supports English (primary) and Simplified Chinese. English is the source language for all content.
Prerequisites
- Node.js v20 (required - other versions are not supported)
- npm
- Git with a GitHub account
Verify your Node version:
node -v # should print v20.x.x
Setup
Fork the Project-HAMi/website repository on GitHub, then clone your fork:
git clone https://github.com/<your-username>/website.git
cd website
git remote add upstream https://github.com/Project-HAMi/website.git
npm install
Local Development
npm run start # dev server at http://localhost:3000 with hot-reload
npm run start:network # same, but accessible on your local network
npm run build:fast # English-only production build, ~45 seconds (use for validation)
npm run build # full build including Chinese and all versions, ~80 seconds (mirrors CI)
npm run clear # clear Docusaurus cache (use when you see stale build errors)
Use npm run start while writing. Use npm run build:fast before opening a PR. CI runs the full npm run build on every PR to master.
Repository Structure
website/
├── docs/ # English source docs (authoritative)
├── i18n/zh/
│ └── docusaurus-plugin-content-docs/
│ └── current/ # Chinese translations
├── versioned_docs/version-vX.Y.Z/ # archived doc snapshots