From what I've read, ExpressJS 3, dropped support of layouts, leaving it to the template engines. So if an engine, doesn't have a support for layouts, what's the best Node.js module that will have it? Or if best sounds subjective, not best but at least a working solution?
I'm going to use Hogan.js as a template engine.
Or, maybe there's a better alternative to layouts as a concept? I find it rather helpful but will like to read about other approaches.
There are plenty of template engines.
Here are some good ones I know:
You'll find more engines here - in this question.
You can take a look of the following templates that is supported in node.js:
https://github.com/joyent/node/wiki/modules#wiki-templating
Also this is benchmark that compares different types of templates according to thier rendering time
https://github.com/Deathspike/template-benchmark
My suggestion: ejs and jade is very powerful and have a lot of features and both are supported in express
I'm using express-ejs-layouts and works perfectly with underscore/lodash and ejs templates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With