## Summary axe reports `empty-table-header` on 116 generated CLI reference pages and several hand-written pages: a header cell with no text is announced by screen readers as an unnamed column. This PR gives every table header cell in `docs/` text, and adds a lint check so empty header cells can't come back. ## How to review this PR - `docs/reference/cli/`: 116 files, these all generate identically, so I would only spot check 2-3 of them and skip the rest - `docs/*` outside of `docs/reference/cli/`: 6 files, normal review of these - `scripts`: 5 files, code review of the Bash and Go files to make sure we're properly inserting headers into each table ## What changed **Generator.** `scripts/clidocgen` wrote an empty header row (`| | |`) over each option's metadata table (Type, Environment, YAML, Default). It now writes `| Property | Value |`. Subcommand tables already had `Name | Purpose` and are unchanged. Regenerated with `make docs/reference/cli/index.md`: 116 files under `docs/reference/cli/` change. The header rows change, and the body rows of each option table are re-padded to the wider first column; the content is otherwise identical. Every option on those 116 pages now shows a visible `Property | Value` header row above Type, Environment, YAML, and Default, so this is a visual change on the docs site as well as a screen reader one. The CLI's own `--help` output doesn't use this template, so it's unchanged. **Audit logs.** `docs/admin/security/audit-logs.md` already has `Field | Tracked` headers on `main` (the generator writes them), so there was nothing to change there; the live-site finding predates that. **Hand-written tables.** - `docs/admin/networking/port-forwarding.md`: the CORS matrix had three empty spanning corner cells. The corner now reads `From user` and `From workspace` (spanning the three row-header columns, beside the Alice/Bob and Workspace rows) and `To user`, `To workspace`, `To app` (over the three row-header columns). The grid is still 3 header rows by 7 columns. The From cells have `scope="row"` and the other header-row cells `scope="col"`, so the From labels don't become column headers for the body's label columns; the body's user, workspace, and app labels are `<th scope="row">`; and a `<caption>` says columns are the origin and rows the destination. - `groups-roles.md`, `airgap.md`, `scale-testing.md`, `workspace-tags.md`: these four corner cells are already filled by #30873. The new check would fail CI without them, so this PR carries the same four lines, byte-identical to #30873 (`Permission`, `Component`, `Scenario`, `Input`), so whichever PR merges second rebases without conflict. If #30873 merges first, these hunks drop out. **New check.** `scripts/docshtmlcheck` (`make lint/docs-html`, part of `make lint`) now also reports `empty-table-header`. I put it there because that checker already parses every Markdown file under `docs/`, generated pages included, with goldmark and tokenizes raw HTML with `golang.org/x/net/html`, and it already runs in CI. A markdownlint custom rule would have needed a new JS rule and HTML parsing there. - Markdown pipe tables: the header row, via goldmark's GFM table extension. - Raw HTML tables: every `<th>`, tracked across HTML blocks, with entities decoded and whitespace trimmed, so `<th></th>`, `<th> </th>`, and `<th><br></th>` are all reported. Markdown between the HTML blocks of an open `<th>` counts as its text. Tables in code blocks are ignored. - Output: `docs/x.md:29: empty-table-header: header cell 1 has no text (table's first header "Auditor")`, plus a summary footer. - The tokenizer loop moved out of `scanNode` into a shared `tokenizeSegments` helper so both checks use it; `scanNode`'s behavior is unchanged. - The style guide's checks table gets one row; the README for the checker describes the rule. ## Testing - Tests first: `TestCheckTables` (now 22 cases) and `TestRunEmptyTableHeader` failed against a stub, then pass. The existing `docshtmlcheck` tests pass unchanged. - `go run ./scripts/docshtmlcheck` on `main` reports 1,561 empty header cells (116 CLI pages, port-forwarding, and the four #30873 tables); on this branch it reports none. - `go test ./scripts/docshtmlcheck/ ./scripts/clidocgen/ ./scripts/docgenenv/`, golangci-lint on the changed packages, `make lint/docs-html lint/docs-manifest lint/docs-gen-filter lint/emdash`, `pnpm run check-docs`, and Vale on the changed hand-written pages all pass. - `make gen` couldn't run to completion locally (no `protoc-gen-go`); CI's gen check covers it. The CLI pages were regenerated with the repo's own target. Review feedback applied incfd29a2160(entities decoded in Markdown text, image alt text and autolinks count as text),709a58f603(per-kind counts, finding order, CLI generator note),8e61ff3afa(CORS matrix scopes and caption), andb807bcbbc7and2871f89bdf(style guide rule section, `make lint/docs-html` in the checks table, coverage counts). Linear: DOCS-1308 --- 🤖 Built with AI assistance.
6.5 KiB
Generated
title, description
| title | description |
|---|---|
| `coder templates edit` | Edit the metadata of a template by name. |
Edit the metadata of a template by name.
Usage
coder templates edit [flags] <template>
Options
--name
| Property | Value |
|---|---|
| Type | string |
Edit the template name.
--display-name
| Property | Value |
|---|---|
| Type | string |
Edit the template display name.
--description
| Property | Value |
|---|---|
| Type | string |
Edit the template description.
--deprecated
| Property | Value |
|---|---|
| Type | string |
Sets the template as deprecated. Must be a message explaining why the template is deprecated.
--icon
| Property | Value |
|---|---|
| Type | string |
Edit the template icon path.
--default-ttl
| Property | Value |
|---|---|
| Type | duration |
Edit the template default time before shutdown - workspaces created from this template default to this value. Maps to "Default autostop" in the UI.
--activity-bump
| Property | Value |
|---|---|
| Type | duration |
Edit the template activity bump - workspaces created from this template will have their shutdown time bumped by this value when activity is detected. Maps to "Activity bump" in the UI.
--autostop-reminder
| Property | Value |
|---|---|
| Type | duration |
Edit how long before the autostop deadline a reminder notification is sent for workspaces created from this template, in Go duration format (e.g. 1h, 30m). Set to 0 to disable.
--autostart-requirement-weekdays
| Property | Value |
|---|---|
| Type | [monday|tuesday|wednesday|thursday|friday|saturday|sunday|all] |
Edit the template autostart requirement weekdays - workspaces created from this template can only autostart on the given weekdays. To unset this value for the template (and allow autostart on all days), pass 'all'.
--autostop-requirement-weekdays
| Property | Value |
|---|---|
| Type | [monday|tuesday|wednesday|thursday|friday|saturday|sunday|none] |
Edit the template autostop requirement weekdays - workspaces created from this template must be restarted on the given weekdays. To unset this value for the template (and disable the autostop requirement for the template), pass 'none'.
--autostop-requirement-weeks
| Property | Value |
|---|---|
| Type | int |
Edit the template autostop requirement weeks - workspaces created from this template must be restarted on an n-weekly basis.
--failure-ttl
| Property | Value |
|---|---|
| Type | duration |
| Default | 0h |
Specify a failure TTL for workspaces created from this template. It is the amount of time after a failed "start" build before coder automatically schedules a "stop" build to cleanup.This licensed feature's default is 0h (off). Maps to "Failure cleanup" in the UI.
--dormancy-threshold
| Property | Value |
|---|---|
| Type | duration |
| Default | 0h |
Specify a duration workspaces may be inactive prior to being moved to the dormant state. This licensed feature's default is 0h (off). Maps to "Dormancy threshold" in the UI.
--dormancy-auto-deletion
| Property | Value |
|---|---|
| Type | duration |
| Default | 0h |
Specify a duration workspaces may be in the dormant state prior to being deleted. This licensed feature's default is 0h (off). Maps to "Dormancy Auto-Deletion" in the UI.
--agents-allowed
| Property | Value |
|---|---|
| Type | bool |
| Default | true |
Allow Coder Agents to create workspaces using this template.
--allow-user-cancel-workspace-jobs
| Property | Value |
|---|---|
| Type | bool |
| Default | true |
Allow users to cancel in-progress workspace jobs.
--allow-user-autostart
| Property | Value |
|---|---|
| Type | bool |
| Default | true |
Allow users to configure autostart for workspaces on this template. This can only be disabled with a Premium license.
--allow-user-autostop
| Property | Value |
|---|---|
| Type | bool |
| Default | true |
Allow users to customize the autostop TTL for workspaces on this template. This can only be disabled with a Premium license.
--require-active-version
| Property | Value |
|---|---|
| Type | bool |
| Default | false |
Requires workspace builds to use the active template version. This setting does not apply to template admins. This is a Premium feature. See https://coder.com/docs/admin/templates/managing-templates#template-update-policies for more details.
--private
| Property | Value |
|---|---|
| Type | bool |
| Default | false |
Disable the default behavior of granting template access to the 'everyone' group. The template permissions must be updated to allow non-admin users to use this template.
-y, --yes
| Property | Value |
|---|---|
| Type | bool |
Bypass confirmation prompts.
-O, --org
| Property | Value |
|---|---|
| Type | string |
| Environment | $CODER_ORGANIZATION |
Select which organization (uuid or name) to use.