Template Engine for Julia
OteraEngine.jl is a template engine for Julia. I added new syntax like Jinja2 and this package got more useful!
Here is an example:
<html>
<head><title>MyPage</title></head>
<body>
{% set name = "watasu" %}
{% if name=="watasu" %}
your name is {{ name }}, right?
{% end %}
{% for i in 1 : 5 %}
Hello {{i}}
{% end %}
{% with age = 15 %}
and your age is {{ age }}.
{% end %}
</body>
</html>
the output of this template is:
#HTML Template File
<html>
<head><title>MyPage</title></head>
<body>
your name is watasu, right?
Hello 1
Hello 2
Hello 3
Hello 4
Hello 5
and your age is 15.
</body>
</html>
Of course, this package can be used not only for HTML but also for e-mails and documents. Please try using! docs