Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including static2000-swig with all npm packages installed. Try it out:

var static2000Swig = require("static2000-swig")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

static2000-swig v0.1.0

Swig adapter for Static2000

static2000-swig

Swig adapter for Static2000.

Installation

Via npm:

$ npm install static2000-swig

Usage

To use swig templates with static2000, install this adapter and specify it as the templateAdapter in static2000. Create templates and content as .html files.

From the command line:

$ static2000 --templateAdapter static2000-swig

Or with the API:

var static2000 = require('static2000');

static2000({ templateAdapter: 'static2000-swig' });

Globals

This adapter imports [templates folder]/includes/globals.html in all files as globals so macros defined there are available both in the body of content and in templates:

{{ globals.myMacro() }}
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free