{ if path.to.item } ... { end }
{ for item in path.to.items } ... { end }
{ include template_name }
{ path.to.item }
To escape {
and }
, use {{
and }}
, respectively.
A macro can be used so that you can pass your own structs in as data to your templates.
rust
context! {
self: (TYPE PARAMETERS) TYPE {
key1 => self.value,
key2 => @iter self.iterable,
key3 => @raw self.html,
key4 => @{
key5 => self.another_value,
...
},
...
}
}
You might also want to see the macros example. Note that these "contexts" are composable.
Features will be added as they are needed. If you think something is missing, please open an issue!