diff options
Diffstat (limited to 'lib/output.js')
-rw-r--r-- | lib/output.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/output.js b/lib/output.js index 2e5bc65..d09f29d 100644 --- a/lib/output.js +++ b/lib/output.js @@ -19,6 +19,7 @@ Output.prototype.writeFile = function(filename, buf) { // Start the generation, for a parsed book Output.prototype.generate = function() { var that = this; + var isMultilingual = this.isMultilingual(); return Promise() @@ -33,9 +34,11 @@ Output.prototype.generate = function() { }) .then(function(files) { return Promise.serie(files, function(filename) { - var isPage = that.book.hasPage(filename); + // Ignore file present in a language book + if (isMultilingual && that.book.isInLanguageBook(filename)) return; - if (isPage) { + // Process file as page or asset + if (that.book.hasPage(filename)) { return that.generator.writePage(that.book.getPage(filename)); } else { return that.generator.writeAsset(filename); |