I'm a professional PHP, Python and Javascript developer from the UK. I've worked with Django, Laravel, and React, among others. I also maintain a legacy Zend 1 application.
I'm not fond of either. I haven't used Pug since it was Jade so my experience of it may not be up date date, but I always found it too terse for my liking and too different to HTML. I haven't used EJS at all, but it looks a lot like Underscore templating which I always found cumbersome.
I agree with Meghan that Handlebars is also worth a look. I've used Handlebars a lot (my site is built with a static site generator I wrote that uses Handlebars), and it has a very shallow learning curve.
Alternatively, have you looked at React.js? It's my usual go-to for JS templating these days and can be used to render the same template on client and server side. It's more complex than the others as it also includes things like event handling, so it might be overkill for you, but for some use cases it can be a boon.
Made complex JSON inspecting super easy. Created revolutionary free online tool(https://jsongrid.com) to visualize JSON as table and Connected every table cell to JSON element, awesome right!
Thanks for the comment, Mark. I find react is a little bit overkill for the kind of project I'm doing. In other words, I need something really simple. Given the site is static, my goal to reuse the pieces of HTML code, that's it.
I'm a professional PHP, Python and Javascript developer from the UK. I've worked with Django, Laravel, and React, among others. I also maintain a legacy Zend 1 application.
In that case, Handlebars should be a good fit. It supports partials, and you can create your own helpers. The syntax is IMHO simpler than EJS or Pug too.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm not fond of either. I haven't used Pug since it was Jade so my experience of it may not be up date date, but I always found it too terse for my liking and too different to HTML. I haven't used EJS at all, but it looks a lot like Underscore templating which I always found cumbersome.
I agree with Meghan that Handlebars is also worth a look. I've used Handlebars a lot (my site is built with a static site generator I wrote that uses Handlebars), and it has a very shallow learning curve.
Alternatively, have you looked at React.js? It's my usual go-to for JS templating these days and can be used to render the same template on client and server side. It's more complex than the others as it also includes things like event handling, so it might be overkill for you, but for some use cases it can be a boon.
Thanks for the comment, Mark. I find react is a little bit overkill for the kind of project I'm doing. In other words, I need something really simple. Given the site is static, my goal to reuse the pieces of HTML code, that's it.
In that case, Handlebars should be a good fit. It supports partials, and you can create your own helpers. The syntax is IMHO simpler than EJS or Pug too.