Express 3.x best layout implementation (template engines) Express 3.x best layout implementation (template engines) express express

Express 3.x best layout implementation (template engines)


There are plenty of template engines.

Here are some good ones I know:

  • Handlebars - very good extention of {{mustache}}.
  • Jade - very powerfull template engine from visionmedia (the author of express.js) and my favorite one.
  • ejs - another template engine from visionmedia.

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.