Thank you for your interest in improving the HAMi documentation! This file covers the technical workflow for contributing changes to this repository.
For contribution guidelines, code of conduct, and the review process, see Contributing to HAMi.
# Install dependencies
npm install
# Start local dev server (hot reload)
npm start
# Build the production site
npm run build
# Serve the built site locally
npm run serveAll PRs must pass the following checks. Run them locally before pushing:
npm installChecks Markdown files for structural issues (heading hierarchy, blank lines, list formatting, etc.):
npm run lintTo auto-fix common issues:
npx markdownlint --fix 'docs/**/*.md' 'tutorials/**/*.md' 'blog/**/*.md'Verifies that all files follow consistent formatting (Prettier):
npm run format:checkTo auto-fix formatting:
npm run formatBuilds the full site (both en and zh locales). This also validates internal links:
npm run buildFor a faster build (English only):
npm run build:fastnpm run check:allThis runs lint → format check → build in sequence.
Every pull request automatically runs:
| Check | What it does |
|---|---|
| Lint | npm run lint - Markdown structural checks |
| Format | npm run format:check - Prettier formatting verification |
| Build | npm run build - Full site build with link validation |
| Broken Links | Internal link check against the built site |
A weekly scheduled run also validates the master branch health.
docs/ Main documentation (English)
tutorials/ Tutorial content
blog/ Blog posts
i18n/zh/ Chinese translations
src/ Custom React components, plugins, CSS
static/ Static assets (images, files)
docusaurus.config.js Site configuration
sidebars.js Documentation sidebar definition
- Create a
.mdfile in the appropriate directory underdocs/ - Add a frontmatter block with
titleand optionallysidebar_label - Add an entry in
sidebars.jsif needed - For Chinese translation, add the corresponding file under
i18n/zh/docusaurus-plugin-content-docs/current/
Open an issue at Project-HAMi/website or reach out on the community channels.