# mozilla/nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)

Repository: https://github.com/mozilla/nunjucks
Canonical: https://ross.abutalabs.com/products/nunjucks
Homepage: https://mozilla.github.io/nunjucks/
Language: JavaScript
License: BSD-2-Clause
License Family: permissive
Last push: 2026-02-07T15:11:07+00:00

## Health v2 (maintenance only)
Score: 52/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 66, release rhythm 8, longevity 100
- inputs: {"age_days": 5137, "days_push": 207, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8988, forks 659 (observed 2026-08-28T04:10:26.659860+00:00)

## What it is
Nunjucks is a full-featured JavaScript templating engine heavily inspired by Jinja2, supporting template inheritance, macros, autoescaping, asynchronous control, and custom filters/extensions. It runs in Node.js and all modern browsers, with precompilation for a small runtime footprint.

## Use cases
- render html templates in a node.js server
- jinja2-style templating for javascript
- share templates between server and browser
- precompile templates for fast client-side rendering
- build static site pages with template inheritance
- port django/jinja2 templates to a javascript stack

## When to choose
- you want jinja2-like syntax in JavaScript
- you need template inheritance, macros, and filters
- you need the same templates in Node and the browser
- you're using frameworks like Eleventy or Apostrophe CMS that rely on it

## When to avoid
- you prefer logic-less templates like Handlebars or Mustache
- you're in a React/Vue-style component ecosystem
- you need streaming or very modern async template features

## Facets
- artifact type: library
- maturity: stable
- function: templating, web-framework, ssr
- domain: web-development, frontend, backend, developer-tools
- platform: browser, cross-platform
- tags: jinja2-inspired, template-engine, html-templates, precompilation, template-inheritance, nodejs, javascript

## Member repositories
- mozilla/nunjucks (main) score 52

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:26.659860+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:24:22.995065+00:00, confidence not recorded.
  - readme: https://github.com/mozilla/nunjucks (fetched 2026-08-28T04:10:26.659860+00:00, sha d159c7edab6f)
  - homepage: https://mozilla.github.io/nunjucks/ (fetched 2026-08-29T08:24:44.386246+00:00, sha c32708aedfb5)
  - registry_npm: https://registry.npmjs.org/nunjucks (fetched 2026-08-29T08:24:44.395395+00:00, sha 88bd6cae2055)
- Data as of 2026-08-30T08:39:29.467469+00:00.
