node package manager



Adds nunjucks support to brunch.


Install the plugin via npm with npm install nunjucks-brunch --save.

Or, do manual install:

  • Add "nunjucks-brunch": "x.y.z" to package.json of your brunch app. Pick a plugin version that corresponds to your minor (y) brunch version.
  • If you want to use git version of plugin, add "nunjucks-brunch": "".

Brunch plugin settings

If customization is needed or desired, settings can be modified in your brunch config file (such as

  • templatePath: Default app/views. The top-level directory where your nunjucks templates are stored. Note: Windows users will want to use app\\views.

  • pathReplace: (RegExp) Default /^app(\/|\\)views(\/|\\).*.html$/. Sets the regular expression applied against the source file path to create the module name. Matched characters are removed.

  • Custom Variables: Any variable you define can be referenced in a nunjucks template. For example, {{ github_username }} would output to PxlBuzzard using the example below.


exports.config =
      github_username: 'PxlBuzzard'