@liamnewmarch/static-plugin-nunjucks
v0.1.3
Published
Static plugin to add support for Nunjucks
Maintainers
Readme
Nunjucks plugin for Static
This plugin adds the Nunjucks template engine to Static.
Usage
First, install Static and this plugin
npm install @liamnewmarch/static @liamnewmarch/static-plugin-nunjucksNext add the plugin in your static.config.js
import nunjucks from '@liamnewmarch/static-plugin-nunjucks';
export default {
// Other Static options here (optional)
plugins: [
nunjucks({
// Plugin options here (optional)
}),
],
}Options
The Nunjucks plugin is a function which can take an optional options object.
extensions(default:{}): an object containing Nunjucks extensions to add.filters(default:{}): an object containing Nunjucks filters to add.globals(default:{}): an object containing Nunjucks globals to add.templates(default:"templates"): the string path used by Nunjucks FileSystemLoader to load templates.
