doc: add types to template (#281220)

* doc: add types to template

* mention types explicitly

* use separator that allows for more items in the type declaration

Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com>

---------

Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com>
This commit is contained in:
Valentin Gagarin 2024-01-25 16:06:24 +01:00 committed by GitHub
parent 5604753fc0
commit 848f518363
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -188,7 +188,8 @@ In that case, please open an issue about the particular documentation convention
}
```
- Use [definition lists](#definition-lists) to document function arguments, and the attributes of such arguments. For example:
- Use [definition lists](#definition-lists) to document function arguments, and the attributes of such arguments as well as their [types](https://nixos.org/manual/nix/stable/language/values).
For example:
```markdown
# pkgs.coolFunction
@ -196,16 +197,15 @@ In that case, please open an issue about the particular documentation convention
Description of what `coolFunction` does.
`coolFunction` expects a single argument which should be an attribute set, with the following possible attributes:
`name`
`name` (String)
: The name of the resulting image.
`tag` _optional_
`tag` (String; _optional_)
: Tag of the generated image.
_Default value:_ the output path's hash.
_Default:_ the output path's hash.
```
## Getting help