0.6.0 • Published 3 years ago

static2000-nunjucks v0.6.0

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

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 }) %}
0.6.0

3 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago