diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-03-07 14:52:30 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-03-07 14:52:30 +0100 |
commit | 1d795076657f7f58fe15e647ad2a00dd37501ae0 (patch) | |
tree | 1fa6c0d6498a4b290afe44bbb59db1b3eaa75975 /lib/template/index.js | |
parent | f05dc6788756892c56e38fec8e91a5d61d79716b (diff) | |
download | gitbook-1d795076657f7f58fe15e647ad2a00dd37501ae0.zip gitbook-1d795076657f7f58fe15e647ad2a00dd37501ae0.tar.gz gitbook-1d795076657f7f58fe15e647ad2a00dd37501ae0.tar.bz2 |
Add book to templating context
Diffstat (limited to 'lib/template/index.js')
-rw-r--r-- | lib/template/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/template/index.js b/lib/template/index.js index eb62549..078dd6c 100644 --- a/lib/template/index.js +++ b/lib/template/index.js @@ -70,9 +70,10 @@ function TemplateEngine(output) { TemplateEngine.prototype.bindContext = function(func) { var ctx = { ctx: this.ctx, - output: this.output, - generator: this.output.name + book: this.book, + output: this.output }; + error.deprecateField(ctx, 'generator', this.output.name, '"generator" property is deprecated, use "output.generator" instead'); return _.bind(func, ctx); }; |