Skip to content

Commit 7c0d13e

Browse files
committed
docs: add section on always quoting variables
Just got caught out by that myself :)
1 parent cbb7d59 commit 7c0d13e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/configuration.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,21 @@ flowchart TD
208208
end
209209
```
210210

211+
## Always Quote Variables
212+
213+
When using Jinja2 variables as values, always quote them.
214+
215+
Otherwise the curly braces will be interpreted as a YAML mapping and not resolve as you
216+
would expect.
217+
218+
```yaml
219+
# ❌ Bad
220+
primary_text_colour: {{theme.off_black}}
221+
222+
# ✅ Good
223+
primary_text_colour: "{{theme.off_black}}"
224+
```
225+
211226
## Advanced Configuration
212227

213228
### Document Variants

0 commit comments

Comments
 (0)