summaryrefslogtreecommitdiffstats
path: root/lib/template.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/template.js')
-rw-r--r--lib/template.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/template.js b/lib/template.js
index 27234f2..315a373 100644
--- a/lib/template.js
+++ b/lib/template.js
@@ -1,8 +1,8 @@
var _ = require("lodash");
var Q = require("q");
-
var nunjucks = require("nunjucks");
+var pkg = require("../package.json");
var TemplateEngine = function(book) {
this.book = book;
@@ -31,7 +31,12 @@ TemplateEngine.prototype.renderFile = function(filename) {
file: {
path: filename,
mtime: stat.mtime
- }
+ },
+
+ // infos about gitbook
+ gitbook: {
+ version: pkg.version
+ }
};
return Q.nfcall(that.env.render.bind(that.env), filename, context);