John John - 12 days ago 5
Node.js Question

Node template engine that can include other templates?

Starting to get into node but struggling to pick a template engine..

Is there an engine out there that can include other templates in the same twig can?

EG:

{% include 'template.html' with {'foo': 'bar'} %}

Answer

I went with this in the end: http://paularmstrong.github.io/swig/

I is a port of twig to js.. absolutely awesome and does exactly what you would expect from a twig.