Closes DOCS-1155. Replaces `docs/manifest/` with one `sidebar.yml` in each docs folder, next to the pages it orders. `docs/manifest.json` is byte-identical before and after (checked after running biome on the compiled output). - Entries name pages and subfolders relative to their own folder, so moving a folder carries its sidebar with it. - `- folder: users` replaces `include` and `children_from`. A bare folder entry loads that folder's `sidebar.yml`. A folder entry with other keys takes its children from the `sidebar.yml` a generator writes there, and its children are metadata overlays. - `clidocgen` and `apidocgen` write `docs/reference/cli/sidebar.yml` and `docs/reference/api/sidebar.yml`, replacing `docs/manifest/generated/`. The `-manifest-only` flag is gone, since the CLI sidebar now comes out with the pages. - `make lint/docs-manifest` fails when a folder has pages but no `sidebar.yml`, when a `sidebar.yml` omits a page in its folder, and when a `sidebar.yml` is unreferenced. - The Makefile, `.gitattributes`, and the CI `docs-gen` filter follow the move. `docsgenfiltercheck` accepts `dir/**/file` patterns so the filter can say `docs/**/sidebar.yml`. - Contributor guidance, the style guides, and the doc skills describe the new layout. **File name.** `sidebar.yml` is not Markdown or `manifest.json`, so the `docs/**/*.md` selectors (coder.com, the `.md` proxy, `llms.txt`, markdownlint, docs-preview) do not pick it up. I checked this in the repository only. I did not check the coder.com or docs-engine repos. **Exempt pages.** The new page check skips `docs/AGENTS.md`, `admin/integrations/opentofu.md`, and `templates/extending-templates/external-auth.md`, which are in no sidebar today, and `install/validate/scale-coder.md`, which another folder's sidebar lists. The list is in `scripts/docsmanifestgen/pages.go`. Drafts (DOCS-1153) and DOCS-1154 should remove it. **Not verified.** I did not run `make gen` end to end, because the REST API step needs widdershins. I ran `clidocgen` into a temp directory and confirmed its sidebar matches the committed one. Unit tests cover the REST API path logic. CI runs `make gen` and will check the rest. <details> <summary>Implementation plan and decisions</summary> 1. Add `Route.Folder` and `SidebarFile` to `docgenenv`. The root `docs/sidebar.yml` holds `versions` and `routes`. 2. Resolve each file's paths against its own folder when loading, and keep each path's spelling (`./x.md` or `x.md`) so the compiled manifest stays byte-identical. 3. Generators write the sidebar inside the folder they generate. 4. Convert the 50 source files and two generated fragments mechanically with a script, then verify the compiled manifest against the old one. 5. Add the page-coverage lint. A parent page may sit beside its folder (`migrate.md` and `migrate/`). 6. Update the Makefile, CI filter, `.gitattributes`, and docs. `templates/startup-coordination` is the one folder that still sits outside its parent. `templates/extending-templates/sidebar.yml` lists it as `folder: ../startup-coordination`, and DOCS-1154 can move it. </details> Generated by Coder Agents on behalf of @nickvigilante.
8.9 KiB
Documentation
This style guide is primarily for use with authoring documentation.
General guidelines
- Use sentence case, even in titles (do not punctuate the title, though)
- Use the second person
- Use the active voice
- Use plural nouns and pronouns (they, their, or them), especially when the specific number is uncertain (i.e., "Set up your environments" even though you don't know if the user will have one or many environments)
- When writing documentation titles, use the noun form, not the gerund form (e.g., "Environment Management" instead of "Managing Environments")
- Context matters when you decide whether to capitalize something or not. For example, "A Job creates one or more Pods..." is correct when writing about Kubernetes. However, in other contexts, neither job nor pods would be capitalized. Please follow the conventions set forth by the relevant companies and open source communities.
Third-party references
If you have questions that aren't explicitly covered by this guide, consult the following third-party references:
| Type of guidance | Third-party reference |
|---|---|
| Spelling | Merriam-Webster.com |
| Style - nontechnical | The Chicago Manual of Style |
| Style - technical | Microsoft Writing Style Guide |
Tools
This repository runs Vale on docs/ as part of CI.
The configuration is the repo-root .vale.ini, and the curated rule set is documented in docs/.style/style-guide/.
Run the same checks locally with make lint/prose.
Vale checks a small subset of the style guide, and it runs in advisory mode: warnings surface as inline PR annotations, but they don't block the build. A clean Vale run doesn't mean a page follows the guide. Refer to What the tooling checks, and what it doesn't for the current coverage, then apply the guide yourself.
The following external tools can also help when drafting. Take their suggestions with a grain of salt because they aren't tuned for Coder's voice or product names:
Feature states
A feature state, such as premium, beta, or early access, marks a page in the sidebar and under the page title.
Set it with the state key on the page's route in the sidebar.yml file of the page's folder (the root is docs/sidebar.yml), not in the page title or H1.
A state on a route applies to that route and to every route beneath it. Follow these rules:
- Put the state on the highest route it applies to.
For a Premium feature with several pages, set
state: [premium]on the feature's top-level route only. - Do not repeat an ancestor's state on a descendant. The descendant inherits it.
- Add a state to a descendant only when the descendant has a state that its ancestors lack, such as an early access subfeature inside a Premium feature. List only the new state; the inherited one still applies.
make lint/docs-manifest fails when a route repeats a state that an ancestor already sets, and names the route and the ancestor.
Folder entries count: an ancestor in another sidebar.yml still counts as an ancestor.
The lint also fails when a route lists the same state twice.
Example
A Premium feature with an early access subfeature:
# docs/admin/widgets/sidebar.yml
title: Widgets
description: Manage widgets across your deployment.
path: ./index.md
state: [premium]
children:
- title: Widget setup
description: Enable and configure widgets.
path: ./setup.md
- title: Widget sync
description: Sync widgets between deployments.
path: ./sync.md
state: [early access]
Widget setup sets no state and inherits Premium.
Widget sync sets only early access and inherits Premium as well.
Do not write state: [premium, early access] on Widget sync, because the lint rejects the repeated premium.
The docs site shows each page as follows:
| Route | Own state |
Sidebar pill | Pills under the page title |
|---|---|---|---|
Widgets |
[premium] |
Premium | Premium |
Widget setup |
none | none | Premium |
Widget sync |
[early access] |
Early access | Premium, Early access |
The sidebar shows a pill on the route that sets a state and on any descendant whose state differs, so a section reads as Premium once instead of on every entry. The pills under a page title show the page's full state: its own states plus every state it inherits.
Inherited pills under the page title require the docs-engine change that adds state inheritance. Until the docs site runs that version, a page shows only the states set on its own route.
Refer to the feature states rule in the content guidelines for the canonical rule.
How to format text
Below summarizes the text-formatting conventions you should follow.
Bold
Use bold formatting when referring to UI elements.
Italics
Use italics for:
- Parameter names
- Mathematical and version variables
Code font
Use code font for:
- User text input
- Command-line utility names
- DNS record types
- Environment variable names (e.g.,
PATH) - Filenames, filename extensions, and paths
- Folders and directories
- HTTP verbs, status codes, and content-type values
- Placeholder variables (see Placeholders in angle brackets)
Use code blocks for code samples and other blocks of code. Be sure to indicate the language your using to apply the proper syntax highlighting.
This is a codeblock.
For code that you want users to enter via a command-line interface, use
console, not bash.
Placeholders in angle brackets
Placeholder values written in angle brackets must be wrapped in backticks so
they render as inline code. The documentation site renders Markdown as HTML, so
an unwrapped placeholder such as <organization-name> is parsed as an unknown
HTML tag and stripped out of the page, so readers never see it.
This applies wherever the text becomes documentation, including the Go CLI help strings and Swagger annotations that generate the CLI and API reference.
# Correct: wrap the placeholder in backticks
Structured as: `<organization-name>/<team-slug>`.
# Incorrect: the placeholder renders as "Structured as: /."
Structured as: <organization-name>/<team-slug>.
Punctuation
Do not use the ampersand (&) as a shorthand for and unless you're referring to a UI element or the name of something that uses &.
You can use the symbol ~ in place of the word approximately.
UI elements
When referring to UI elements, including the names for buttons, menus, dialogs, and anything that has a name visible to the user, use bold font.
Example: On the Environment Overview page, select Configure SSH.
Don't use code font for UI elements unless it is rendered based on previously
entered text. For example, if you tell the user to provide the environment name
as myEnvironment, then use both bold and cold font when referring to the name.
Example: Select myEnvironment.
When writing out instructions that involve UI elements, both of the following options are acceptable:
- Go to Manage > Users.
- In the Manage menu, select Users.
Product-specific references
Below summarizes the guidelines regarding how Coder terms should be used.
Capitalized terms
The only Coder-specific terms that should be capitalized are the names of products (e.g., Coder).
The exception is code-server, which is always lowercase. If it appears at the beginning of the sentence, rewrite the sentence to avoid this usage.
Uncapitalized terms
In general, we do not capitalize the names of features (unless the situation calls for it, such as the word appearing at the beginning of a sentence):
- account dormancy
- audit logs
- autostart
- command-line interface
- dev URLs
- environment
- image
- metrics
- organizations
- progressive web app
- registries
- single sign-on
- telemetry
- workspace
- workspace providers
- workspaces as code
We also do not capitalize the names of user roles:
- auditor
- member
- site admin
- site manager
Standardized spellings
- WiFi