4 ms·
Ask HN: What HTML template engines do you use?
I'm planning on making a small web app using SSR rather than splitting the backend and client work. In researching options for the project (Go based), I've "discovered" that there's a _lot_ more to templates than what I've used in the past (Jinja2 via Django, Flask, and Ansible).
So to the actual web developers here, what template engines do you use and why? I've never worked with compiled templates but they seem interesting, though I don't know their cost/benefit tradeoffs very well yet.
Your choice of language, stack, syntax preference, what-have-you! I'm just genuinely curious about the broader templating ecosystem and workflows.
- sylware 4y agoI use manually coded templates. With a bit of rigourous structure, it is more than enough. I do that using plain and simple C.
- mattbillenstein 4y agoRe Python, I like Mako. Jinja2 essentially has a python-like DSL, but I already know python, so it just seemed like a hassle to learn another thing.
- PaulHoule 4y agoJinja2 in Python, Freemarker in Java
- webmaven 4y agoI really like the TAL, TALES, METAL syntaxes (also known as Zope Page Templates). There are implementations of these syntaxes in a wide variety of languages, the one I use most is the Python implementation known as Chameleon: https://chameleon.readthedocs.io/en/latest/ https://chameleon.readthedocs.io/en/latest/
- surprisetalk 4y agoI use Elixir's native EEX templating for some personal projects. My Elixir script takes markdown files with YAML front matter and produces static HTML pages, which are served via Cloudflare Pages. [1] https://hexdocs.pm/earmark/1.4.2/Earmark.html https://hexdocs.pm/earmark/1.4.2/Earmark.html [2] https://hexdocs.pm/yaml_front_matter/readme.html https://hexdocs.pm/yaml_front_matter/readme.html [3] https://pages.cloudflare.com https://pages.cloudflare.com