The best node.js templating engine!

Witch is your favorite node.js templating engine? Why do you like it?

Comments 6

  • I find EJS to work the best for me. It's easy to setup and very well documented. Works both with node.js and in the browser.

    The only small thing I dislike about it is the syntax. It uses <% %> while most other templating engines use {{ }}. You get used to that pretty quickly though.

  • I also dislike the EJS syntax... I've tried it myself and it's pretty ease to use...

  • Handlebars is nice. It has lots of features and is really popular. I only recently started using it and everytime I was wondering how to do something there was already a thread on stackoverflow with a working solution.

  • Considering all the available options, you can't select the best one, but you surely can select out of the few most popular ones out there. Here are some:

    These are some of the best ones available out there. For me however, Handlebars works pretty well, and I use it the most.
    Keep in mind though, Mustache is widely supported, and the syntax of Mustache and Handlebars are pretty similar.
    Ghost( A blogging platform ) also uses Handlebars and I use it, so it also helps me to write themes for it.

    For absolute beginners, Pug might be a nice choice, it has the easiest documentation of all - in my opinion.
    If you're already familiar with using templating engines, Handlebars or Mustache might be a good choice. And although I've never used doT, it claims to be fast and small, something that some websites require. Pick accordingly, have a nice time :)
    Also, you won't go wrong with any one of them :)

    As I've already stated, my choice is Handlebars, for it's minimal, while being complete. And, knowing that it's, for the most part, compatible with Mustache, makes me use it more :)