Write

Write a page

Add a page, pick its type and check the writing.

Add a page

  1. Add an entry to docs/nav.ts with a title, slug and description.
  2. Add the slug to docs/source-map.json with its type and the product sources it describes.
  3. Create docs/pages/<slug>.mdx. Until the file exists, the page shows “Not written yet”.

The title and description come from the nav entry. Set them in the front matter only to override it.

A content file with no nav entry stops the build, so no page is unreachable.

Internal pages

Some pages are only for the docs team, such as how to write and maintain the docs. Mark their tab as internal in docs/nav.ts:

{ id: 'authoring', title: 'Authoring', icon: 'pen-line', internal: true, groups: [ ... ] }

An internal tab shows in npm run dev. Production builds leave it out, with its pages, search entries and llms.txt lines. To include it in a build, for example for the docs team’s own copy, set DRIFTLESS_INTERNAL=1.

Use an internal tab for pages that only the docs team needs, such as how to write and maintain the docs.

Pick a page type

Every page uses one type: concept, how-to, integration or reference. STYLE-GUIDE.md lists the headings for each type. The example pages in the Documentation tab show each one.

Record what you checked

Each written page records the product commit it was checked against, and how:

verified:
  commit: a1b2c3d
  method: Ran the steps on a local copy

The drift check uses this commit. State the method honestly. “Read the code” is valid.

Check the writing

npm run prose -- docs/pages/get-started/quickstart.mdx
npm run build

The prose checker finds sentences to look at again. A person or an agent still reads the page.