+0
日增长
9,006
stars
665
forks
128
watchers
523
prs
1,023
issues
36
releases
README
Nunjucks [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![CI][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] Nunjucks is a full featured templating engine for javascript. It is heavily inspired by jinja2. View the docs here. Installation npm install nunjucks To use the file watcher built-in to Nunjucks, Chokidar must be installed separately. npm install nunjucks chokidar (View the CHANGELOG) Documentation Nunjucks info and documentation source is in /docs and publishes to https://mozilla.github.io/nunjucks/ Browser Support Supported in all modern browsers. For IE8 support, use es5-shim. Tests Run the tests with npm test. Get in touch If you have ideas or questions, or need help, you can reach us in the nunjucks:mozilla.org room on Matrix. Want to help? Contributions are always welcome! Before you submit an issue or pull request, please read our contribution guidelines. Contributors [npm-image]: https://img.shields.io/npm/v/nunjucks.svg [npm-url]: https://npmjs.org/package/nunjucks [downloads-image]: https://img.shields.io/npm/dm/nunjucks.svg [downloads-url]: https://npmjs.org/package/nunjucks [github-actions-image]: https://github.com/mozilla/nunjucks/actions/workflows/tests.yml/badge.svg [github-actions-url]: https://github.com/mozilla/nunjucks/actions [codecov-image]: https://img.shields.io/codecov/c/gh/mozilla/nunjucks.svg [codecov-url]: https://codecov.io/gh/mozilla/nunjucks/branch/master
Top issues
#790Twig embed-like functionality could be very useful65 comments · 2016-07-11#539Passing data to includes39 comments · 2015-10-02#507require('nunjucks') within webpack returns an empty object31 comments · 2015-09-05#1059Nunjucks 4 roadmap / tracking ticket27 comments · 2018-01-28#296Loop Controls26 comments · 2014-10-15#560[2.*] Nunjucks does not transfer values from getters to the copied context object25 comments · 2015-10-22#1433Future plans for nunjucks?24 comments · 2023-01-23#696extends, defined block multiple time18 comments · 2016-03-11
Latest release
v3.2.4 v3.2.4 2023-04-19What's Changed fix: html encode backslashes if used with escape filter or autoescape by @fdintino in https://github.com/mozilla/nunjucks/pull/1437. Fixes CVE-2023-2142 (bugzilla 1825980) Full Changelog: https://github.com/mozilla/nunjucks/compare/v3.2.3...v3.2.4