TEMPLate Engine.
A jinja2-like template engine in rust inspired by Jinja2Cpp.
- Easy-to-use public interface.
- Shared template environment.
- Conformance to Jinja2 specification.
- Rich error reporting.
- Shared template environment with templates cache support.
- expressions. You can use almost every expression style: simple, filtered, conditional, and so on.
- filters that can be used via '|' operator (default, first, last, length, max, min, abs, float, int, string, sum, round, capitalize, title, upper, wordcount, truncate and center).
- 'if' statement (with 'elif' and 'else' branches)
- 'for' statement (without 'else' branch and 'if' part support)
- 'with' statement
- 'include' statement
- space control and 'raw'/'endraw' blocks
TODO:
- Statements:
- for (Partial implementation)
- set
- filter
- extends
- include
- macro
- line statements
- expressions
- left associative order in operations
- if expressions
- Accessors
- Points (.)
- Filters
- attr
- batch
- dictsort
- filesizeformat
- forceescape
- format
- groupby
- indent
- list
- map
- pprint
- random
- reject
- rejectattr
- replace
- reverse
- safe
- select
- selectattr
- slice
- sort
- striptags
- tojson
- unique
- urlencode
- urlize
- wordwrap
- xmlattr
- Custom filters
- Use of settings