2022-05-20 21:35:24 +00:00
|
|
|
Conventions and style for documentation
|
|
|
|
---------------------------------------
|
2020-06-08 12:31:34 +00:00
|
|
|
|
2017-05-18 16:49:00 +00:00
|
|
|
Manual pages structure:
|
|
|
|
|
|
|
|
- add references to all external commands mentioned anywhere in the text to the
|
2022-05-20 21:35:24 +00:00
|
|
|
*SEE ALSO* section
|
2017-05-18 16:49:00 +00:00
|
|
|
- also add related, not explicitly mentioned
|
|
|
|
- the heading levels are validated
|
|
|
|
- mandatory, manual page ===
|
|
|
|
- mandatory, sections ---
|
2022-05-20 21:35:24 +00:00
|
|
|
- optional, sub-sections ^^^
|
2017-05-18 16:49:00 +00:00
|
|
|
- command-specific examples are mostly free of restrictions but should be
|
|
|
|
readable in all output formats (manual page, html)
|
|
|
|
|
|
|
|
- subcommands are in alphabetical order
|
|
|
|
|
|
|
|
- long command output or shell examples: verbatim output
|
2022-05-20 21:35:24 +00:00
|
|
|
- use code-block:: directive
|
2017-05-18 16:49:00 +00:00
|
|
|
|
|
|
|
Quotation in subcommands:
|
|
|
|
|
2022-05-20 21:35:24 +00:00
|
|
|
- exact syntax: monotype ``usage=0``
|
|
|
|
- reference to arguments etc: *italics*
|
|
|
|
- command reference: bold ``btrfs filesystem show``
|
|
|
|
- subcommand names should be spelled in full, ie. *filesystem* instead of *fi*
|
|
|
|
- section references: italics *EXAMPLES*
|
2017-05-18 16:49:00 +00:00
|
|
|
|
2018-11-26 16:32:10 +00:00
|
|
|
- argument name in option description: caps in angle brackets <NAME>
|
2017-05-18 16:49:00 +00:00
|
|
|
- reference in help text: caps NAME
|
2022-05-20 21:35:24 +00:00
|
|
|
also possible: caps italics *NAME*
|
2017-05-18 16:49:00 +00:00
|
|
|
|
|
|
|
- command short description:
|
2022-05-20 21:35:24 +00:00
|
|
|
- command name: bold **command**
|
2017-05-18 16:49:00 +00:00
|
|
|
- optional unspecified: brackets [options]
|
|
|
|
- mandatory argument: angle brackets <path>
|
|
|
|
- optional parameter with argument: [-p <path>]
|
|
|
|
|
2020-06-08 12:31:34 +00:00
|
|
|
Other:
|
|
|
|
|
2022-05-20 21:35:24 +00:00
|
|
|
- for notes use note:: directive, is rendered as a separate paragraph and
|
2020-06-08 12:31:34 +00:00
|
|
|
should be used only for important information
|
|
|
|
|
2022-05-20 21:35:24 +00:00
|
|
|
- warning:: directive is rendered as a separate paragraph
|
2020-06-08 12:31:34 +00:00
|
|
|
and most likely more visible than NOTE, use for critical information that
|
|
|
|
may cause harm, irreversible state or performance problems
|
|
|
|
- should point reader to other part of documentation to seek more details
|
|
|
|
|
2018-11-26 16:32:10 +00:00
|
|
|
References:
|
2022-05-20 21:35:24 +00:00
|
|
|
- RST and Sphinx Cheatsheet https://spl.hevs.io/spl-docs/writing/rst/cheatsheet.html
|
|
|
|
- RST Cheat Sheet https://sphinx-tutorial.readthedocs.io/cheatsheet/
|