Files
gitbook/lib/templating/index.js
T
2016-01-27 10:24:06 +01:00

29 lines
622 B
JavaScript

var nunjucks = require('nunjucks');
function TemplatingEngine(book) {
this.book = book;
this.log = book.log;
this.nunjucks = new nunjucks.Environment(
this.loader,
{
// Escaping is done after by the asciidoc/markdown parser
autoescape: false,
// Syntax
tags: {
blockStart: '{%',
blockEnd: '%}',
variableStart: '{{',
variableEnd: '}}',
commentStart: '{###',
commentEnd: '###}'
}
}
);
}
module.exports = TemplatingEngine;