Documentation is part of the product. If a change alters a user-facing flag, command, setting, or behavior, update these docs in the same pull request.
The documentation site
The published site is a VitePress 1 project in website/:
website/
├── index.md # landing page (layout: home)
├── docs/ # Markdown documentation
│ ├── index.md # /docs/ landing page
│ ├── concepts/
│ ├── tutorials/
│ ├── getting-started/
│ ├── guides/
│ ├── reference/
│ └── contributing/
├── .vitepress/
│ ├── config.mjs # site config, nav, sidebar, search
│ ├── theme/ # custom theme, CSS, Vue components
│ └── public/ # logo, favicon, social card, .nojekyll
├── package.json
└── package-lock.jsonPreview locally:
cd website
npm install
npm run devBuild the static site:
npm run build # website/.vitepress/dist
npm run previewVitePress fails the build on dead internal links, so verify locally before opening a pull request.
Adding or editing a page
- Create or edit a Markdown file under
website/docs/. - Add front matter with
titleanddescription. - Register the page in
themeConfig.sidebarin.vitepress/config.mjsusing its route (for example/docs/reference/tools). - Use relative
.mdlinks between docs; VitePress rewrites them to the right URLs and prepends the/M31A/base automatically. - Keep headings in sentence case, write in second person, and include working examples.
The visual system lives in .vitepress/theme/custom.css. Reusable Vue components are in .vitepress/theme/components/ and registered globally in .vitepress/theme/index.js. Use <DocCards /> on index pages and <TerminalShowcase /> on the home page.
Deployment
.github/workflows/docs.yml builds on pushes to master that touch website/ and deploys .vitepress/dist through actions/upload-pages-artifact and actions/deploy-pages. Pull requests validate the build without deploying.
The site is published at https://eshanized.is-a.dev/M31A/ (the eshanized.github.io/M31A/ URL redirects there). Repository Pages settings use GitHub Actions as the publishing source. Workflow actions are pinned to commit SHAs by repository policy.
Generated documentation
The repository root contains scripts that generate reference material from source of truth:
| Command | Output |
|---|---|
npm run schema:settings | schemas/settings.schema.json |
npm run docs:settings | Settings sections in docs/reference/configuration.md and docs/cli/settings.md (when those files exist) |
npm run docs:keybindings | Shortcut tables in docs/reference/keyboard-shortcuts.md (when the file exists) |
These scripts write only between marker comments such as <!-- SETTINGS-AUTOGEN:START --> and <!-- SETTINGS-AUTOGEN:END -->, and skip files that are not present. Use --check to verify generated content is current. When a setting or keybinding changes, update the corresponding page in this site as well.
Root documentation files
The repository root keeps README.md, CONTRIBUTING.md, ROADMAP.md, SECURITY.md, and M31A.md. Keep those in sync when product behavior changes.
Style guide
- Use sentence case for headings and present tense.
- Address the reader as "you".
- Keep paragraphs short and lead with the outcome (BLUF).
- Tag code fences with a language (
bash,json,text). - Use VitePress callouts (
::: note,::: tip,::: warning) sparingly. - Test every command example before committing.
Before you submit
cd website && npm run build
cd .. && npm run preflightNext steps
See Development and Testing.