Skip to main content

๐Ÿ“ 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:

CommandPurpose
pnpm buildFull production build
pnpm build:enEnglish-only build (faster for docs-only checks)
pnpm serveServe the production build locally
pnpm clearClear Docusaurus cache (use when the site behaves oddly)
pnpm lintRun all linters (ESLint + Stylelint via Trunk)
pnpm lint:fixAuto-fix linting issues
pnpm write-heading-idsRegenerate heading IDs across all docs

Content Rootsโ€‹

The wiki has three independent docs roots:

DirectoryURL PrefixPurpose
docs//docsCore documentation, getting started, guides
community//communityCommunity guides, Zsh plugin standard
ecosystem//ecosystemAnnexes, packages, plugins

File Naming Conventionsโ€‹

  • Numeric prefixes control sidebar order: 01_first.mdx, 02_second.mdx
  • Directories need a _category_.json file (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:

ComponentUsage
<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
```

Prefer relative links between pages:

See [Getting Started](../getting_started) for more details.

Use absolute URLs only for external resources.

Branch and PR Workflowโ€‹

  1. Branch from next: git checkout -b docs/my-page next
  2. Make changes to English source files only
  3. Run pnpm build:en to catch broken links and MDX errors
  4. Open a PR targeting next
Never edit i18n/ files directly

Translation 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:

  1. Join the project at translate.zshell.dev
  2. Translate strings in the Crowdin editor
  3. 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โ€‹