Participate in Docs
Documentation Guidelines
Valaxy is preparing for the 1.0 release, and we look forward to your participation in writing and translating documentation.
Documentation Organization
Valaxy documentation uses a path-based separation approach for organizing content in different languages:
- English documentation is located in
/docs/pages/ - Chinese documentation is located in
/docs/pages/zh/
For example:
docs/pages/guide/getting-started.md # English version
docs/pages/zh/guide/getting-started.md # Chinese versionBilingual Container Approach (for specific scenarios)
Some documents (such as blog posts) may use bilingual containers to write content in both languages within the same file:
::: zh-CN
Chinese content
:::
::: en
English content
:::For more details, see Single Page i18n and i18n Container Syntax.
How to Translate
1. Create the Corresponding Chinese Document
If you find an English document that doesn’t have a Chinese version yet, create the corresponding file under /docs/pages/zh/.
For example, to translate /docs/pages/guide/ssr-compat.md:
- Create
/docs/pages/zh/guide/ssr-compat.md - Copy the structure from the English document
- Translate the content to Chinese
- Keep code examples unchanged (unless comments need localization)
2. Keep Document Structure Consistent
- Frontmatter: Keep the same
categories,top, etc. fields, only translatetitle - Heading Hierarchy: Maintain the same heading structure as the English version
- Code Examples: Usually no translation needed, keep as-is
- Links: Internal links in Chinese docs should point to Chinese versions (e.g.,
/zh/guide/...)
3. Translation Tips
- Technical terms can include English on first use, e.g., "SSR (Server-Side Rendering)"
- Maintain technical accuracy, refer to Vue documentation translation standards
- Comments in code can be localized, but keep variable and function names in English
How to Submit
Use GitHub Pull Requests to submit to valaxy. It’s recommended to submit a complete markdown file or a category translation as one commit.
Commit messages should start with docs:.
Examples:
- Adding new Chinese translation:
docs: add zh translation for ssr-compat - Updating existing translation:
docs: update guide translation - Fixing typos:
docs: fix typo in xxx.md - Updating English docs:
docs(en): update getting-started guide
Documentation Preview
Before submitting, preview the documentation locally:
# Install dependencies
pnpm install
# Start documentation dev server
pnpm docs:dev
# Build documentation (to check for build errors)
pnpm docs:buildVisit http://localhost:4859 to view the documentation, and use the language toggle button in the top right to test language switching.
To Be Continued.