Skip to content

Commit

Permalink
add line about d2-config
Browse files Browse the repository at this point in the history
  • Loading branch information
alixander committed Nov 7, 2024
1 parent e5db99a commit 31cd8d6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/tour/vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,21 @@ In other words, if you call `D2_PAD=2 d2 --theme=1 input.d2`, it doesn't matter
`theme-id` and `pad` are set to in `input.d2`'s `d2-config`; it will use the options from
the command.
:::

:::info `data`
`data` is an anything-goes map of key-value pairs. This is used in contexts where
third-party software read configuration, such as when D2 is used as a library, or D2 is
run with an external plugin.

For example,

```d2
vars: {
d2-config: {
data: {
power-level: 9000
}
}
}
```
:::

0 comments on commit 31cd8d6

Please sign in to comment.