Expand description
Per-subcommand documentation extras (man pages + mdbook).
The clap derive in crate::args is the source of truth for the
NAME, SYNOPSIS, and OPTIONS surface; xtask renders that
automatically into both groff (man pages) and markdown (mdbook).
This module owns everything richer: DESCRIPTION prose, EXAMPLES,
NOTES, FILES, SEE ALSO.
Bodies are authored in markdown. xtask passes them through verbatim for the markdown output and converts them to groff for the man pages, so a single source feeds both formats. The supported markdown vocabulary is intentionally small: paragraphs, bold and italic, code spans and fenced code blocks, bulleted and numbered lists. Stick to that and the groff conversion stays predictable.
Each subcommand exposes its extras here as a ManContent entry
in extras_for. Bodies live under cli/man/<sub>/*.md and are
pulled in via include_str!, keeping prose out of man.rs.
Onboarding a new section is two-step:
- Drop one or more
.mdfiles intocli/man/<subcommand>/. - Add a match arm in
extras_forreferencing them.
Subcommands without an entry get the auto-generated page with no extras: still useful, just shorter.
Structs§
- ManContent
- Hand-authored extras for a single command’s documentation.
Constants§
- REPORTING_
BUGS - Markdown body for the
REPORTING BUGSsection.
Functions§
- extras_
for - Look up the doc extras for
subcommand.