๐ Contributing to the Wiki
The wiki is a Docusaurus 3 site. All source files are
in the z-shell/wiki repository. English is
the source language; translations are managed via Crowdin.
Prerequisitesโ
Local Developmentโ
git clone https://github.com/<your-username>/wiki.git
cd wiki
pnpm install # install dependencies
pnpm start # dev server at http://localhost:3000
Other useful commands:
| Command | Purpose |
|---|---|
pnpm build | Full production build |
pnpm build:en | English-only build (faster for docs-only checks) |
pnpm serve | Serve the production build locally |
pnpm clear | Clear Docusaurus cache (use when the site behaves oddly) |
pnpm lint | Run all linters (ESLint + Stylelint via Trunk) |
pnpm lint:fix | Auto-fix linting issues |
pnpm write-heading-ids | Regenerate heading IDs across all docs |
Content Rootsโ
The wiki has three independent docs roots:
| Directory | URL Prefix | Purpose |
|---|---|---|
docs/ | /docs | Core documentation, getting started, guides |
community/ | /community | Community guides, Zsh plugin standard |
ecosystem/ | /ecosystem | Annexes, packages, plugins |
File Naming Conventionsโ
- Numeric prefixes control sidebar order:
01_first.mdx,02_second.mdx - Directories need a
_category_.jsonfile (see below) - All English source files only โ never edit files under
i18n/
Frontmatterโ
Every .mdx file requires these fields:
---
id: unique_page_id
title: "Page Title"
sidebar_position: 1
image: /img/png/theme/z/320x320.png
description: One-sentence description for SEO.
keywords:
- relevant
- keywords
---
_category_.jsonโ
Required for every new directory:
{
"label": "๐ Section Name",
"position": 1,
"link": {
"type": "generated-index"
}
}
MDX Authoring Patternsโ
Admonitionsโ
Use Docusaurus admonitions for callouts instead of blockquotes:
:::tip
Helpful hint.
:::
:::info
Neutral information.
:::
:::warning
Something to be cautious about.
:::
:::danger
Critical warning.
:::
Global MDX Componentsโ
These components are available in every .mdx file without importing:
| Component | Usage |
|---|---|
<Highlight color="...">text</Highlight> | Colored text spans |
<Emoji symbol="๐" label="party"/> | Accessible emoji |
<GhRepoBadge repo="z-shell/zi"/> | GitHub repo badge |
<ShellCodeCopy>command</ShellCodeCopy> | Copyable shell command |
Code Blocksโ
Use language identifiers and showLineNumbers when helpful:
```zsh showLineNumbers
zi light z-shell/F-Sy-H
```
Linksโ
Prefer relative links between pages:
See [Getting Started](../getting_started) for more details.
Use absolute URLs only for external resources.
Branch and PR Workflowโ
- Branch from
next:git checkout -b docs/my-page next - Make changes to English source files only
- Run
pnpm build:ento catch broken links and MDX errors - Open a PR targeting
next
i18n/ files directlyTranslation files under i18n/ are managed exclusively through Crowdin. Manual edits will be overwritten on the next sync.
Localizationโ
The wiki supports multiple languages via Crowdin. To contribute a translation:
- Join the project at translate.zshell.dev
- Translate strings in the Crowdin editor
- Approved translations are synced back to the repo automatically
Do not fork the repo and edit i18n/ files manually.
Style Guidelinesโ
- Use sentence case for headings (e.g.,
## Code of conduct, not## Code Of Conduct) - Keep paragraphs short โ aim for โค 5 sentences per paragraph
- Prefer tables for structured comparisons
- Use admonitions sparingly โ only when the callout level genuinely matches the content
- Formatting is enforced by Prettier (120-char print width, double quotes, 2-space indent)
See Alsoโ
- Getting Started โ org-wide branch and commit conventions
- Project Management โ how work is tracked