From a6fcb7f863556827167cf4f4651597d110fc9c9c Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Tue, 9 Sep 2025 12:12:37 +0100 Subject: [PATCH] Add basic documentation on what is and isn't checked by `template check` --- docs/reference/cli/templates.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/reference/cli/templates.md b/docs/reference/cli/templates.md index ccced6bed..8fb1d92db 100644 --- a/docs/reference/cli/templates.md +++ b/docs/reference/cli/templates.md @@ -17,3 +17,12 @@ INFO mas_core::templates::check: Rendering template name="register.html" context 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"} ... ``` + +What is checked: +- the Jinja templates are syntactically valid +- all translation keys exist + +What is not checked: +- the validity of the generated HTML (you can forget closing tags, or otherwise create invalid HTML output) +- undefined variables (`{{ undefined_variable }}` will render as an empty string and not raise an error) +- all translation keys exist *in your intended language(s)* (so some translation keys may fall back to English)