Text template engines

Are there any generic template engines for Julia, like Mako, Jinja and others are for Python? I couldn’t find any, and website generators in Julia (e.g. JuDoc, Franklin) don’t seem to use template engines either. Am I missing something, or there are indeed none? I mostly use a template engine (Mako for now) to generate HTML and Latex.

1 Like

There is HAML.jl. Any others? Genie.jl has one built-in.

1 Like

Is https://github.com/jverzani/Mustache.jl
what you are looking for ?

2 Likes

What I’m looking for is something like lit-html where you can use Julia to directly build HTML/SVG, with the core library doing the escaping. Anything like this?

1 Like

https://github.com/yurivish/Hyperscript.jl ?

2 Likes

As @fonsp points out in a Hyperscript.jl discussion, something like Observable’s Hypertext Literal, but for Julia would be fantastic.

2 Likes

Thanks for all these suggestions! As far as I understand, the only real text templating engine here is Mustache.jl, others are specific to HTML. In principle it’s nice that the syntax is (almost?) cross-platform, and the same templates can be used with mustache implementations in other languages. However I think I’m staying with Python’s Mako for now, as it doesn’t require learning another “sub-language” just for templating and uses basically plain Python instead.