doc/readme: Clarify variable literals (#567409)

This commit is contained in:
Matt Sturgeon
2026-09-27 15:54:53 +00:00
committed by GitHub

View File

@@ -140,14 +140,12 @@ A few markups for other kinds of literals are also available:
- `` {env}`XDG_DATA_DIRS` ``
- `` {file}`/etc/passwd` ``
- `` {option}`networking.useDHCP` ``
- `` {var}`/etc/passwd` ``
- `` {var}`pkgs` ``
The values will be formatted as inline `<code>` elements.
These literal kinds are used mostly in NixOS option documentation.
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point).
Though, the feature originates from [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-manpage) with slightly different syntax.
They are handled by `myst_role` defined per renderer. <!-- reverse references in code -->
#### Admonitions
Set off from the text to bring attention to something.