diff options
Diffstat (limited to 'lib/book.js')
-rw-r--r-- | lib/book.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/book.js b/lib/book.js index f920100..5335896 100644 --- a/lib/book.js +++ b/lib/book.js @@ -128,13 +128,16 @@ Book.prototype.parseLangs = function() { Book.prototype.parseSummary = function() { var that = this; - return that.findFile(that.config.getStructure("summary")) - .then(function(summary) { + return Q.all([ + that.findFile(that.config.getStructure("summary")), + that.findFile(that.config.getStructure("readme")) + ]) + .spread(function(summary, readme) { if (!summary) throw "No SUMMARY file"; return that.template.renderFile(summary.path) .then(function(content) { - return summary.parser.summary(content); + return summary.parser.summary(content, readme.path); }); }) .then(function(summary) { @@ -156,7 +159,7 @@ Book.prototype.parseGlossary = function() { }); }) .then(function(glossary) { - that.glossary = glossaryy; + that.glossary = glossary; }); }; |