summaryrefslogtreecommitdiffstats
path: root/lib/template.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-23 16:04:10 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-23 16:04:10 +0100
commitc47166d70099ffa8a4f5efc0c6e123d06fa76acd (patch)
treedcc39ed4cb0fd065f620388c0e2a031a63582d41 /lib/template.js
parent77834f81665ca8d7eaec49be5da9f5562b46389a (diff)
downloadgitbook-c47166d70099ffa8a4f5efc0c6e123d06fa76acd.zip
gitbook-c47166d70099ffa8a4f5efc0c6e123d06fa76acd.tar.gz
gitbook-c47166d70099ffa8a4f5efc0c6e123d06fa76acd.tar.bz2
Fix version in generator tag
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);