HTML template engines

TwitterFacebook
Get flash to fully experience Pearltrees
{{header}} {{#bug}} {{/bug}} {{#items}} {{#first}} {{name}} {{/first}} {{#link}} {{name}} {{/link}} {{/items}} {{#empty}} The list is empty.

{{ mustache }}

http://mustache.github.com/
Mustache is a logic-less template syntax. It can be used for HTML, config files, source code - anything. It works by expanding tags in a template using values provided in a hash or object. https://github.com/janl/mustache.js

janl/mustache.js - GitHub

http://handlebarsjs.com/ Handlebars provides the power necessary to let you build semantic templates effectively with no frustration.

Handlebars.js: Minimal Templating on Steroids

https://github.com/wycats/handlebars.js/ Handlebars.js is an extension to the Mustache templating language created by Chris Wanstrath. Handlebars.js and Mustache are both logicless templating languages that keep the view and the code separated like we all know they should be.

wycats/handlebars.js - GitHub

donpark/hbs - GitHub

https://github.com/donpark/hbs While Handlbars.js is already a Node.js module, it cannot be used directly as an Express.js view engine. This module will fill that role until Handlebars.js adds Express.js view engine support directly.
Taking that last example here is a little trick to always compile the templates in development mode (so the changes are immediately reflected).

raycmorgan/Mu - GitHub

https://github.com/raycmorgan/Mu
https://github.com/visionmedia/jade Alternatively, if uglifyjs is installed via npm ( npm install uglify-js ) you may execute the following which will create both files. However each release builds these for you.

visionmedia/jade - GitHub

http://haml-lang.com/

#haml

“All of Hashrocket’s new projects are done in Haml, and we’ve now decided to transition everything else in our portfolio over to Haml as soon as possible.
For a higher quality implementation you may want to look at my Jade template engine, however the syntax is slightly different. Jade's engine may be back-ported to haml.js in the future. Benchmarks rendering the same 21 line haml file located at benchmarks/page.haml , shows that this library is nearly 65% or 3 times faster than haml-js.

visionmedia/haml.js - GitHub

https://github.com/visionmedia/haml.js

creationix/haml-js - GitHub

Note that this works almost the same as ruby's haml , but doesn't pretty print the html. https://github.com/creationix/haml-js

creationix/jquery-haml - GitHub

jQuery-haml is a haml like language written in JSON.

Using HAML templates in JavaScript - How To Node - NodeJS

Using haml-js is pretty straightforward.
var te = require("..

cramforce/node-asyncEJS - GitHub

EJS conditionally supports the concept of "filters". A "filter chain" is a designer friendly api for manipulating data, without writing JavaScript. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

visionmedia/ejs - GitHub