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 Trunk linters and formatting checks
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, tools
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โ€‹

Choose the simplest useful presentationโ€‹

Start with ordinary Markdown and add a richer element only when it improves comprehension or scanning.

NeedUse
Short comparison or reference matrixGFM table with compact cells
Steps that must happen in orderNumbered list
Work readers can completeGFM task list (- [ ])
Advice, context, risk, or dangerDocusaurus admonition
Optional or advanced explanation<details> with a one-line <summary>
Equivalent operating-system or tool instructions<Tabs> and <TabItem>
Landing-page navigation<CardGrid> and <Card>

Do not use tables for long prose or sequential procedures, tabs for sequential steps, task boxes as decorative bullets, or raw HTML for layout. Blockquotes are for attributed quotations; use admonitions for callouts.

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

Add title="path/to/file" when a filename matters. Highlight only the lines being discussed, and reserve showLineNumbers for longer examples referenced by line number.

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 main: git checkout -b feature-123 main
  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 main
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โ€‹