Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/judas-christ/static2000-swig
Swig adapter for Static2000
https://github.com/judas-christ/static2000-swig
Last synced: about 1 month ago
JSON representation
Swig adapter for Static2000
- Host: GitHub
- URL: https://github.com/judas-christ/static2000-swig
- Owner: judas-christ
- License: mit
- Created: 2014-12-01T21:49:07.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-01T22:31:57.000Z (about 10 years ago)
- Last Synced: 2024-04-14T12:53:36.923Z (9 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
static2000-swig
===============Swig adapter for [Static2000](https://github.com/judas-christ/static2000).
## Installation
Via npm:
```bash
$ 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:
```bash
$ static2000 --templateAdapter static2000-swig
```Or with the API:
```js
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:
```htmldjango
{{ globals.myMacro() }}
```