Maintaining documentation
The site uses Astro Starlight with pnpm. It is a static GitHub Pages site: contributors do not need a CMS, a server, or an installed copy of Winenv to edit prose.
Choose a content responsibility
Section titled “Choose a content responsibility”- Tutorial: a safe, complete learning exercise, such as Your first session.
- Guide: a task or problem, including troubleshooting.
- Reference: exact commands, parameters, storage paths, and constraints.
- Explanation: why the model works this way, such as claims and ownership.
These follow the Diátaxis approach. Choose the responsibility before writing; do not create empty categories merely to fill a template.
Source of truth
Section titled “Source of truth”Content lives in docs/src/content/docs/; Chinese counterparts use zh/ with the same file name and extension. Prefer Markdown. Use MDX only when a Starlight component materially helps, as on the homepage. Add a descriptive title, description, and sidebar.order in frontmatter.
Root policy files remain canonical. Site policy pages summarize and link to them. CHANGELOG.md is generated by semantic-release; pnpm docs:sync generates the two site wrappers. Do not edit those wrappers, VERSION, or the release history manually. The site follows the source revision recorded by the successful Release workflow, including its generated release commit. Only the latest stable Winenv release is the supported user channel; the site is not an archive of older manuals.
Use /winenv/.../ for site links and /winenv/zh/.../ for Chinese links. Preserve published headings and routes, or add a deliberate compatibility alias. scripts/docs-legacy-routes.json records the pre-migration public routes and anchors; do not erase entries to make a failed check pass.
For Chinese bold labels immediately followed by prose, keep punctuation outside the markers: write **Scoop**:运行, not **Scoop:**运行. Check that the rendered list contains actual bold elements, not visible asterisks. Literal Markdown examples belong in inline code or fenced code blocks.
Local checks
Section titled “Local checks”After the development setup:
pnpm docs:devpnpm test:docspnpm docs:buildThe build checks page metadata, JSON examples, translation pairs, local HTML links/assets, and fragments. It also rejects paired ** markers left in rendered prose, excluding code examples. It does not execute installer examples, detect every formatting error, or guarantee that external websites are available. English edits require a corresponding Chinese change in the same diff; review the translation and make the matching change rather than updating a meaningless timestamp. Semantic accuracy still needs human review.
For interface changes, run pnpm exec playwright install chromium followed by pnpm docs:test. This uses a production preview because Pagefind search is built for production, not the development server. Tests cover language detection and persistence, deep links, search, mobile navigation, and an automated accessibility smoke check. Automated checks are not a complete accessibility certification.
Dependency and publishing policy
Section titled “Dependency and publishing policy”.node-version and packageManager pin the toolchain; pnpm-lock.yaml is the only dependency lockfile. CI installs with --frozen-lockfile. Dependency builds are explicitly allowed, new packages wait at least 24 hours, and trust downgrades are blocked except for reviewed, exact-version exceptions in pnpm-workspace.yaml.
pnpm audit signatures checks registry signatures. This is not a claim that every dependency has independently verified build provenance; the trust-downgrade policy is an additional signal, not proof that a package is safe. Review lockfile changes and keep security exceptions narrow.
The pnpm setup action uses a separate, integrity-locked npm bootstrap. Its implicit npm advisory request is disabled to avoid blocking initialization on that endpoint; this does not disable the project’s explicit signature check. Signature verification is not a vulnerability scan.
Publish through the existing GitHub Actions workflows. Do not run a second pnpm release system, add Changesets, or manually upload the generated site. Documentation commits do not require a Winenv version bump.
