Nunjucks Template Engine | Nunjucks with Node and Express

Nunjucks

Nunjucks is rich and powerful template engine for JavaScript. Nunjucks is developed by Mozilla and is maintained by Node JS Foundation. Nunjucks can be used in Node and browser. Its is inspired by Jinja2 ( a web template engine for python ).

In node, Nunjucks is installed using npm. Its is rich, fast, extensible and available everywhere. It’s just 8kb gzipped.

Advantages

  1. Rich templating language with block inheritance, autoescaping, macros, asynchronous control, etc.
  2. Fast and Lean High-performant. Small 8K gzipped runtime with precompiled templates in the browser
  3. Extensible easily extensible with custom filters and extensions
  4. Everywhere Available in node and all modern web browsers, with precompilation options

Install Nunjucks

To install Nunjucks, type npm i nunjucks.

npm i nunjucks