Skip to content

Commit be3ceff

Browse files
committed
Add rest of documentation on templates check
1 parent 2c4d2ab commit be3ceff

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/reference/cli/templates.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,13 @@ INFO mas_core::templates::check: Rendering template name="index.html" context={"
2121
Options:
2222
- `--out-dir <directory>`: Render templates and emit them to the specified directory, which must either not exist or be empty.
2323
- `--stabilise`: Remove sources of nondeterminism from template inputs, so that renders are reproducible. Only useful with `--out-dir`.
24+
25+
What is checked:
26+
- the Jinja templates are syntactically valid
27+
- the templates can render with a few sample values, with the branding from the MAS configuration
28+
- undefined variables (`{{ undefined_variable }}`) will raise errors
29+
- all translation keys exist
30+
31+
What is not checked:
32+
- the validity of the generated HTML (you can forget closing tags, or otherwise create invalid HTML output)
33+
- all translation keys exist *in your intended language(s)* (so some translation keys may fall back to English)

0 commit comments

Comments
 (0)