diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-17 13:39:20 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-17 13:39:20 +0100 |
commit | 96105d6ba0ac1bc86bd34088ae4763bf09b3c3ea (patch) | |
tree | babef2d655f326e71be04ce2420373ba5e390fd4 /lib/output/json.js | |
parent | 853ba6079c37aa747721c8ee5d014479e69f3ad9 (diff) | |
download | gitbook-96105d6ba0ac1bc86bd34088ae4763bf09b3c3ea.zip gitbook-96105d6ba0ac1bc86bd34088ae4763bf09b3c3ea.tar.gz gitbook-96105d6ba0ac1bc86bd34088ae4763bf09b3c3ea.tar.bz2 |
Extend templating context (and json output)
Diffstat (limited to 'lib/output/json.js')
-rw-r--r-- | lib/output/json.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/output/json.js b/lib/output/json.js index 9e6cb3c..c4317c9 100644 --- a/lib/output/json.js +++ b/lib/output/json.js @@ -18,11 +18,11 @@ JSONOutput.prototype.onPage = function(page) { // Write as json .then(function() { - var json = _.extend(page.getContext(), { - gitbook: { - version: gitbook.version - } - }); + var json = _.extend( + page.getContext(), + gitbook.getContext(), + that.book.getContext() + ); return that.writeFile( page.withExtension('.json'), |