Skip to content

Improve the docs ​

You will change a page of this site and see it live, in both languages, with the same checks the CI runs. The rule behind every page: what the docs tell a person to run, someone ran, and what they show as output is what the command printed.

Before you begin 10 minutes

  1. Run the site

    The site is built with VitePress, from the docs-site folder. Start it and open the address it prints; a page reloads as you save it.

    Terminal
    sh
    npm run docs:dev

    Every page has an "Edit this page" link at the bottom that opens its file on GitHub.

  2. Find the file

    A page's address is its path: /charts/quickstart is docs-site/charts/quickstart.md, and its French version is docs-site/fr/charts/quickstart.md. Two kinds of pages live there:

    • Written by hand: their front matter says type: guide (or tutorial, concept, reference, index), without quotes. Edit them.
    • Generated: the reference of the CLI, the SDK, the author MCP, the errors, the fields of each standard and the troubleshooting page. Their front matter says type: "reference", with quotes. Do not edit them: change their source (the standard, the code, or the generator in docs-site/scripts/), then regenerate.
    Terminal
    sh
    npm run docs:gen
  3. Write the page

    Each page does one job, and reads the same way:

    1. The outcome first: the front matter's description and the paragraph under the title say what the reader will have at the end.
    2. A block to copy within the first screen for a tutorial or a guide.
    3. Real output only. A code block is never typed from memory: the line before it is an example marker, an HTML comment that starts with example: and names a file (and, for JSON, a pointer such as #/parts). The build prints the file, or the part the pointer names, in place of the block. Outputs come from docs-site/.generated/, written by a generator that runs the real alta in a temporary folder.
    4. A next step at the bottom: the NextSteps component, with up to three cards.
    5. English and French, same structure, same commands; the French says "tu". A new page also needs its entry in the sidebar, docs-site/.vitepress/nav.ts, or the docs tests report it as an orphan.

    Use one word for one thing: chart, value, sign-in, part, proof, repair, grant, release, repository, index, publisher, locality. The components (Steps, Prereqs, Callout, NextSteps, ErrorRef) are in docs-site/.vitepress/theme/components/; look at an existing page of the same type and follow it.

  4. Run the checks

    docs:build first checks that every generated page is up to date, then builds the site and fails on a dead link. The tests check that every page has its type and its French twin, that no internal word slipped in, that every example marker points at a real value, and that the quickstarts still run as written.

    Terminal
    sh
    npm run docs:build
    npx vitest run tests/docs-site.test.ts tests/docs-snippets.test.ts
    node docs-site/scripts/audit.mjs

    The last command scores every page against the checklist above (outcome first, a block to copy, real output, a next step, French, one word per thing) and prints what each page misses. Run every command your page tells a reader to run, the way they would, in a temporary folder.

Then open the pull request as for any change: Your first pull request. A docs change needs the evidence too: the checks above, and a screenshot of the page in light and dark mode if you changed how it looks.

What's next

Alta OS is open source (MIT).