tenjin
Buzzwords
- dynamic
- zero-allocation in render
- logic-less
- enables structural sharing
Template Syntax
{ if path.to.item } ... { end }
{ for item in path.to.items } ... { end }
{ include template_name }
{ path.to.item }
To escape {
and }
, use {{
and }}
, respectively.
Macro Syntax
A macro can be used so that you can pass your own structs in as data to your templates.
context!
You might also want to see the macros example. Note that these "contexts" are composable.
Truthiness
- All undefined values are falsey.
- Objects, maps and arrays are truthy.
- Booleans evaluate to their own value.
- Integers are truthy iff they are non-zero.
- Strings are truthy iff they are non-empty.
- Try to make truthiness as unsurprising as possible.
Contributing
Features will be added as they are needed. If you think something is missing, please open an issue!