Title: node express template engine that supports layouts and partials
Tags: node.js;express;template-engine
Question: Is there a good way of doing templating (that allows me to write html -- not jade), that will support layouts and partials?
I have only been able to use ejs with express-partials npm plugin to get this behavior. However I feel the ejs site is out of date and not well supported.
I'm looking for good examples.
I want to create a main layout that would have header + footer and include a separate template for the nav for example.
Knockoutjs looks well supported, but I cannot find many examples of using it with express.
Update: I found a pretty good article here from LinkedIn's evaluation of js templates: http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more
Comment: I use ejs without any issues.  In my layout i have separate partials for header-nav, side-nav, footer... Works great!

Comment: thanks. that's what i'm using now -- just wanted to see if there was anything newer out there before I get too far into coding.

Here is the accepted answer: I have settled on using visionmedia's ejs with ejs-locals for layouts, includes, and blocks.
https://github.com/RandomEtc/ejs-locals
https://github.com/visionmedia/ejs

Here is another answer: Give handlebars a try.
You can use it with hotplates to have your templates automatically resolved.
It also supports reusing your partials client side.

Here is another answer: Try twigjs. It fits your description well.
https://github.com/fadrizul/twigjs
But ejs don't looks for me unsupported either. I think that this are even solutions.
Comment for this answer: `Twigjs`, `ejs` and `jade` are three most common template engines for nodejs. So, I think that you best to choose one of them.
Comment for this answer: Twigjs looks even less maintained than ejs - no repo updates for over a year, the twigjs.org site is a 404
Comment for this answer: still seems a bit new, twigjs.org goes to a parked page.

Here is another answer: You can easily mimic this with the "include" feature in EJS. It's not quite as elegant as layouts in Express 2.x but it works for simple scenarios where all you need is a header and a footer plus you don't need to use Jade.
Basically you can create two "layout" pages (layoutTop.ejs and layoutBottom.ejs) and manually include them on every page.
mypage.ejs
include layoutTop
html for my page.ejs goes here
include layoutBottom
(Shameless plug) You can see a more detailed explanation here:
http://hectorcorrea.com/Blog/Using-layouts-with-EJS-in-Express-3.x
Comment for this answer: You missed out the
Comment for this answer: As far as I can tell, the same data that is available on the page seems to be available on the includes.
Comment for this answer: Can you pass data to your includes like you could with partials in express2.x?

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 4, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2012:00:09/18/12', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<node.js><express><template-engine>', 'Title': 'node express template engine that supports layouts and partials', 'ViewCount': 5798, 'id': 12471043, 'user_AboutMe': '<p>Javascript Hacker who loves node + svelte.</p>\n', 'user_AccountId': 15729.0, 'user_DisplayName': 'chovy', 'user_Reputation': 67693.0, 'user_Views': 4715.0, 'user_id': 33522.0}}