docs: flatten lone index pages to single files (#30129)

The beta docs engine turns a directory that holds only an `index.md`
into an empty collapsible section in the sidebar. Two pages on `main`
have that shape: `docs/admin/external-auth/index.md` and
`docs/ai-coder/agents/tools/index.md`. docs-engine is handling the shape
in its own code (the sidebar render fix in
https://github.com/coder/docs-engine/pull/196 and the sync-side handling
in https://github.com/coder/docs-engine/pull/195), and this change
removes it at the source by moving each page to a flat file:
`docs/admin/external-auth.md` and `docs/ai-coder/agents/tools.md`. Both
directories held only `index.md`, with no images or other files.

The change updates the two `docs/manifest.json` paths, 29 inbound
relative links across 17 pages, and the relative links inside the moved
pages (three images and two page links in `external-auth.md`, one page
link in `tools.md`), which now resolve one directory up. The ESR upgrade
table in `docs/install/operate/upgrade/esr-2.29-2.34-upgrade.md` is
re-padded because its link cells shrank, which is why that file shows 28
changed lines. No generator under `scripts/`, the docs-preview workflow,
or `docs/.style` references either path.

Published URLs stay the same, so no redirect is needed. coder.com's
`convertPathToRoute` strips the `index.md` or `.md` suffix, the
docs-preview workflow's `map_doc_path` maps `<dir>/index.md` and
`<dir>.md` to the same route, and docs-engine's `mapMdPath` returns
`admin/external-auth` and `ai-coder/agents/tools` for both the old and
new paths.

For verification, `docs/manifest.json` parses and all 471 of its paths
exist. `make pre-commit-light` passes, which covers markdownlint, the
table formatter, typos, emdash, and shellcheck, and `go run
./scripts/docshtmlcheck` passes. A local script resolved all 306
relative links in the changed files, and every one that the move touched
points at an existing file and heading. linkspector runs on this PR in
CI. A backport PR for `release/2.37` moves the same two pages plus
`admin/licensing` and `install/other`:
https://github.com/coder/coder/pull/30130.

This change was prepared with AI assistance. The AI agent that prepared
it ran the checks described above.

---

🤖 Built with AI assistance.
This commit is contained in:
Nick Vigilante
2026-09-30 14:34:33 -04:00
committed by GitHub
parent b6aab35a7b
commit 1fd383e4fd
20 changed files with 63 additions and 63 deletions
+3 -3
View File
@@ -22,9 +22,9 @@ authorization. This can be achieved by using the Git provider, such as GitHub,
as an authentication method. If you don't know how to do that, we have written
documentation to help you:
- [GitHub](../admin/external-auth/index.md#github)
- [GitLab self-managed](../admin/external-auth/index.md#gitlab-self-managed)
- [Self-managed git providers](../admin/external-auth/index.md#self-managed-git-providers)
- [GitHub](../admin/external-auth.md#github)
- [GitLab self-managed](../admin/external-auth.md#gitlab-self-managed)
- [Self-managed git providers](../admin/external-auth.md#self-managed-git-providers)
With the authentication in place, it is time to set up the template to use the
[Git Clone module](https://registry.coder.com/modules/git-clone) from the
+1 -1
View File
@@ -179,7 +179,7 @@ resource "coder_agent" "main" {
Because Docker is running on the same machine as the control plane, there is no need to
authenticate `coder_agent`. But if your `coder_agent` is running on a remote
host, your template will need
[authentication credentials](../admin/external-auth/index.md).
[authentication credentials](../admin/external-auth.md).
This template's agent also runs a startup script, sets environment variables,
and provides metadata.