Skip to content

Commit 5a0d33d

Browse files
committed
docs: tip on re-using options
1 parent c3035ad commit 5a0d33d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/get-started/basic-content.qmd

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,27 @@ quartodoc:
154154
Note that the **with options** block sets `members: []` inside `options`.
155155
This sets `members: []` as the default for each piece of content.
156156

157+
::: {.callout-tip}
158+
Options can be given a name, and re-used in multiple sections:
159+
160+
```yaml
161+
- title: Some section
162+
options: &no-members
163+
members: []
164+
content:
165+
- ThingA
166+
- ThingB
167+
- title: Another section
168+
options: *no-members
169+
content:
170+
- ThingC
171+
```
172+
173+
The code above uses `&no-members` to name the options in the first section "no-members",
174+
then `*no-members` to reference it in the second section.
175+
The `&` and `*` are called an anchor and alias, respectively, in YAML.
176+
:::
177+
157178
## Specifying package path
158179

159180
Different levels of configuration let you set the `package` option.

0 commit comments

Comments
 (0)