<commit_before># koa-nunjucks-2
Lightweight [Koa](http://koajs.com/) middleware for [Nunjucks](https://mozilla.github.io/nunjucks/).

[![NPM version][npm-img]][npm-url]
[![Build status][travis-img]][travis-url]
[![License][license-img]][license-url]
[![Dependency status][david-img]][david-url]

## Installation
```
npm install --save koa-nunjucks-2
```
For Koa 2, use the next tag
```
npm install --save koa-nunjucks-2@next
```

## Usage
### Example
```js
var Koa = require('koa');
var app = new Koa();
var koaNunjucks = require('koa-nunjucks-2');
var path = require('path');

app.use(koaNunjucks({
  ext: 'html',
  path: path.join(__dirname, 'views'),
  nunjucksConfig: {<commit_msg>Remove note about next tag from README<commit_after># koa-nunjucks-2
Lightweight [Koa](http://koajs.com/) middleware for [Nunjucks](https://mozilla.github.io/nunjucks/).

[![NPM version][npm-img]][npm-url]
[![Build status][travis-img]][travis-url]
[![License][license-img]][license-url]
[![Dependency status][david-img]][david-url]

## Installation
```
npm install --save koa-nunjucks-2
```
NOTE: v3 requires Koa 2 or later. If you're using Koa 1, use v2 of this package.

## Usage
### Example
```js
var Koa = require('koa');
var app = new Koa();
var koaNunjucks = require('koa-nunjucks-2');
var path = require('path');

app.use(koaNunjucks({
  ext: 'html',
  path: path.join(__dirname, 'views'),
  nunjucksConfig: {
{'fraction_non_alphanumeric': 0.20199857244825126, 'fraction_numerical': 0.008565310492505354, 'mean_word_length': 5.286995515695067, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5053848', 'n_tokens_mistral': 573, 'n_tokens_neox': 554, 'n_words': 118}