Skip to content

Commit a6fcb7f

Browse files
committed
Add basic documentation on what is and isn't checked by template check
1 parent 0d908dc commit a6fcb7f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/reference/cli/templates.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ INFO mas_core::templates::check: Rendering template name="register.html" context
1717
INFO mas_core::templates::check: Rendering template name="index.html" context={"csrf_token":"fake_csrf_token","current_session":{"active":true,"created_at":"2021-09-24T13:26:52.962135085Z","id":1,"last_authd_at":"2021-09-24T13:26:52.962135316Z","user_id":2,"username":"john"},"discovery_url":"https://example.com/.well-known/openid-configuration"}
1818
...
1919
```
20+
21+
What is checked:
22+
- the Jinja templates are syntactically valid
23+
- all translation keys exist
24+
25+
What is not checked:
26+
- the validity of the generated HTML (you can forget closing tags, or otherwise create invalid HTML output)
27+
- undefined variables (`{{ undefined_variable }}` will render as an empty string and not raise an error)
28+
- all translation keys exist *in your intended language(s)* (so some translation keys may fall back to English)

0 commit comments

Comments
 (0)