diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-19 13:27:17 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-19 13:27:17 +0100 |
commit | 52179163dda6f52e0d64dc516c5612ac1e17be8f (patch) | |
tree | 93e4007f13f4325587666868992f8ae67803a75c | |
parent | 8ed9f645fc7bd7e79290dcf7c855df33d3cda262 (diff) | |
download | gitbook-52179163dda6f52e0d64dc516c5612ac1e17be8f.zip gitbook-52179163dda6f52e0d64dc516c5612ac1e17be8f.tar.gz gitbook-52179163dda6f52e0d64dc516c5612ac1e17be8f.tar.bz2 |
Fix output for sub-books in multi languages
-rw-r--r-- | lib/book.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/book.js b/lib/book.js index 991e126..bfe0a17 100644 --- a/lib/book.js +++ b/lib/book.js @@ -6,10 +6,13 @@ var fs = require("./utils/fs"); var Configuration = require("./configuration"); var parser = require("./parser"); -var Book = function(root, options) { +var Book = function(root, options, parent) { // Root folder of the book this.root = root; + // Parent book + this.parent = parent; + // Configuration this.config = new Configuration(this, options); Object.defineProperty(this, "options", { @@ -45,8 +48,10 @@ Book.prototype.init = function() { return new Book( path.join(that.root, lang.path), _.extend({}, that.options, { + 'output': path.join(that.options.output, lang.path), 'lang': lang.lang - }) + }), + that ) }); }); |