Nunjucks support for SourceJS
npm install sourcejs-nunjucksSourceJS middleware to support Nunjucks template language (.njk or .njk.html) instead of native *.src.
To install, run npm in sourcejs/user folder:
```
npm install sourcejs-nunjucks --save
In sourcejs/user/options.js you need to add index.njk or index.njk.html to rendering.specFiles:`js`
module.exports = {
rendering: {
specFiles: [
'index.njk',
'index.njk.html',
'index.src',
//...
]
}
//...
};
Then restart your SourceJS application, middleware will be loaded automatically.
After installing middleware, instead of index.src pages, you can index.njk files with Nunjucks markup.
index.njk
`
{#
This is just a comment which will be fully stripped and ignored during parsing.
#}