Express 3.x best layout implementation (template engines)

C-Blu picture C-Blu · Dec 15, 2013 · Viewed 17.6k times · Source

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.

Answer

Leonid Beschastny picture Leonid Beschastny · Dec 15, 2013

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.