Build a Node.js website where all pages share a common header and footer by using Nunjucks template inheritance.
Generate HTML emails or reports from JSON data by writing a template with placeholder syntax that Nunjucks fills in at runtime.
Add server-side rendering to an Express.js app so dynamic pages load without a front-end JavaScript framework.
Nunjucks is a templating engine for JavaScript, maintained by Mozilla. A templating engine is a tool that lets you build HTML pages (or other text files) by combining a fixed structure with variable data. Instead of writing the same HTML repeatedly with slightly different content, you write the structure once using special placeholder syntax, and the engine fills in the values at runtime. Nunjucks is inspired by Jinja2, a popular Python templating system, and brings a similar feature set to JavaScript. It supports template inheritance, which means you can define a base page layout and have other templates extend it, avoiding repeated code. It also handles asynchronous operations, which matters in JavaScript where many tasks happen in a non-blocking way. It works both on the server side (in Node.js) and in the browser. Installation is a single command via npm, the standard JavaScript package manager. The documentation is hosted separately on GitHub Pages. The README for this project is brief and points to the external documentation site for full details. This is a developer utility, not an end-user application.
← mozilla on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.