summaryrefslogtreecommitdiffstats
path: root/lib/book.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-24 18:07:17 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-24 18:07:17 +0100
commit0b4a6b5362795f25594aabb458378df1599e4dbd (patch)
treef5511e33d640cd9493363414907f4e524b1e6029 /lib/book.js
parent3a0636046ea0b9bc898438d502e3bf80f6c4d312 (diff)
downloadgitbook-0b4a6b5362795f25594aabb458378df1599e4dbd.zip
gitbook-0b4a6b5362795f25594aabb458378df1599e4dbd.tar.gz
gitbook-0b4a6b5362795f25594aabb458378df1599e4dbd.tar.bz2
Output folder is an option for FolderOutput
Diffstat (limited to 'lib/book.js')
-rw-r--r--lib/book.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/book.js b/lib/book.js
index d8c6542..5fa3075 100644
--- a/lib/book.js
+++ b/lib/book.js
@@ -48,6 +48,10 @@ function Book(opts) {
// If multi-lingual, book can have a parent
this.parent = opts.parent;
+ if (this.parent) {
+ this.language = path.relative(this.parent.root, this.root);
+ console.log(this.language);
+ }
// A book is linked to an fs, to access its content
this.fs = opts.fs;
@@ -187,10 +191,7 @@ Book.prototype.parse = function() {
that.books.push(langBook);
- return langBook.parse()
- .then(function() {
- langBook.config.set('output', path.join(that.config.get('output'), lang.id));
- });
+ return langBook.parse();
});
}