tera
tera copied to clipboard
A template engine for Rust based on Jinja2/Django
The auto-removing of glob path is great, but I might want to give it a custom prefix. Is this possible? Use case is, say, loading everything in `shared/templates` and I'd...
As far as I can tell, you can create arrays in a template, but not a map. It'd be useful to have map support, so you can create maps and...
To my knowledge variables & expressions are rather "flat"; That is, they don't allow very much nesting which really limits their usefulness For example, take this code: ```html {%- set...
Add a take_while filter that mirrors Iterator::take_while in a similar fashion to the "filter" filter, comparing attributes against a value or against null if no value is given. Add also...
The Tera manual says this about the filters `first`, `last` and `nth`: > If the array is empty, returns empty string. The [Jinja 2.11.x template designer documentation](https://jinja.palletsprojects.com/en/2.11.x/templates/#list-of-builtin-filters) doesn't seem to...
Tera is great, thank you so much. Given that tera is useful when rendering user generated templates, it would be great if there was a simple way of generating a...
I'm using `Tera` with `actix-web`, which creates a separate app state (including a `Tera` instance in my case) per thread. I was originally doing something like this: ```rust // Compile...
It is the main bottleneck in terms of performance. Some previous thoughts are on https://github.com/Keats/tera/issues/340
Since data is serialized to JSON using serde-json, when iterating over a map the implementation of the map defines the iteration order. serde-json uses a `BTreeMap` by default, where entries...
Hi, Does Tera have a syntax equivalent to Jinja's call? If not, it would be interesting to see this feature appear in Tera ! (Especially for the first example with...