Commit 5712b2a
feat(cli-docs): supplemental content system for generated CLI reference pages (#3271)
* feat(cli-docs): structured supplemental docs, cli-modifiers directive, and assembler/changelog content
Adds four generator improvements and restores hand-authored content for the
assembler and changelog namespaces.
Generator changes:
- New `:::{cli-modifiers}` directive renders a pill row (destructive,
requires-confirmation, auth required, idempotent, scope, streaming,
long-running) between the usage block and description on generated pages
- `CliSupplementalDoc` parser splits supplemental files into typed sections:
`## Description` overrides the intro; `## Options` / `## Arguments` override
per-parameter text (unknown keys are a build error); any other `##` heading
appends as post-content after the generated parameter table
- `__argh_root` and other `ReservedMetaCommands` tokens are stripped from
generated usage lines
- Schema `notes` field is no longer rendered (use supplemental post-content instead)
- Behaviour-flag params (dryRun, confirmationSkip, output) get a quick-reference
block above Arguments/Options
- Stack-overflow fix: expose `Collector` as `protected` on `MarkdownFile` so CLI
file subclasses can emit diagnostics without storing `BuildContext` as a record field
Supplemental content:
- Assembler namespace and all sub-commands (assemble, build, clone, serve, index,
bloom-filter create/lookup, config init, content-source match/validate,
deploy apply/plan/update-redirects, navigation validate/validate-link-reference)
- Changelog commands: add, bundle-amend, evaluate-pr, gh-release, init, remove, render
Docs:
- cli-reference-how-to step 3 replaced with a link to the new supplemental-docs page
- New `cli-supplemental-docs.md` documents file naming, heading rules, and
`## Options` / `## Arguments` override syntax
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* fix: import ordering and broken relative links in supplemental docs
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* fix: namespace option overrides and fenced code block languages
- Thread OptionOverrides and emitError through NamespacePage so namespace
supplemental ## Options are applied and typos are caught at build time
- Add text language to directory tree fenced blocks in cli-supplemental-docs.md
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* fix: output formats always rendered and role-scoped override validation
- Output formats block no longer skipped when command has no modifier pills
- Option/argument override validation now checks against the correct parameter
role subset so a flag name in ## Arguments (or vice-versa) is caught
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent c570a83 commit 5712b2a
36 files changed
Lines changed: 1166 additions & 155 deletions
File tree
- docs
- cli
- assembler
- bloom-filter
- config
- content-source
- deploy
- changelog
- src
- Elastic.Documentation.Site/Assets
- markdown
- Elastic.Markdown
- Extensions/CliReference
- IO
- Myst/Directives
- CliModifiers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments