Welcome to curly’s documentation!¶
Curly is a toy templating language with a single goal: to show how to implement template languages. It has minimal practical set of actions which allows to tell about its usefulness. It is fine: features are not the goal, but simplicity and clearness of implementation are.
Jinja2 and Mako laughs over Curly: from the point of view of these template languages, Curly is a dumb and rigid. As a language it is close to Mustache and Handlebars, but these minimal languages have even more features than Curly. Yes, they are. Reference implementation of Curly has no even primitive if/else constuctions (only ifs).
Here is a full example of the supported language features:
Hello {{ first_name }},
{% if last_name %}
{{ last_name }}
{% elif title %}
{{ title }}
{% else %}
Doe
{% /if %}!
Here is the list of stuff I like:
{% loop stuff %}
- {{ item.key }} (because of {{ item.value }})
{% /loop %}
And that is all!