static2000-nunjucks
v0.6.0
Published
Nunjucks adapter for Static2000
Downloads
10
Readme
static2000-nunjucks
Nunjucks adapter for Static2000.
Installation
Via npm:
npm install static2000-nunjucks
Usage
Install, create templates and content as .html
files and run static2000 with templateAdapter
specified:
static2000 --templateAdapter static2000-nunjucks
or
var static2000 = require('static2000');
static2000({ templateAdapter: 'static2000-nunjucks' });
Globals
Global include
This adapter includes [templates folder]/includes/globals.html
in all files, templates and content, so macros defined there are available both in the body of content and in templates:
{{ globals.myMacro() }}
Global functions
The global functions are available without namespace in the templates:
{% set visiblePages = query({ visible: true }) %}