Files
coder/docs/admin/users
Nick Vigilante d7612d5f1c refactor: move docs sidebar files next to the pages they order (#32637)
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.
2026-12-04 14:24:57 +00:00
..