January 2024
Load Multiple MiniJinja Templates From A Directory
---
minijinja =
---
// NOTE `features = ["loader"] might not be required in
// recent versions of minijinja
use ;
Output:
Hello, world
Notes
-
The path in the
template_dirvariable has a file in it calledalfa.html -
The content of
alfa.htmlisHello, {{ name }} -
The
{{ name }}string gets replace with value ofnamefrom thecontext!()
end of line