diff options
Diffstat (limited to 'lib/generate')
-rw-r--r-- | lib/generate/index.js | 3 | ||||
-rw-r--r-- | lib/generate/page/index.js | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/generate/index.js b/lib/generate/index.js index 2118c46..8cd263d 100644 --- a/lib/generate/index.js +++ b/lib/generate/index.js @@ -298,6 +298,9 @@ var generateBook = function(options) { // Finish generation .then(function() { + return generator.callHook("finish:before"); + }) + .then(function() { return generator.finish(); }) .then(function() { diff --git a/lib/generate/page/index.js b/lib/generate/page/index.js index 8e44187..a926d13 100644 --- a/lib/generate/page/index.js +++ b/lib/generate/page/index.js @@ -26,6 +26,9 @@ Generator.prototype.loadTemplates = function() { this.summaryTemplate = swig.compileFile( this.plugins.template("ebook:sumary") || path.resolve(this.options.theme, 'templates/ebook/summary.html') ); + this.glossaryTemplate = swig.compileFile( + this.plugins.template("ebook:glossary") || path.resolve(this.options.theme, 'templates/ebook/glossary.html') + ); }; // Generate table of contents @@ -46,7 +49,7 @@ Generator.prototype.finish = function() { var output = path.join(this.options.output, "index.html"); var progress = parse.progress(this.options.navigation, "README.md"); - + return Q() // Write table of contents @@ -54,6 +57,11 @@ Generator.prototype.finish = function() { return that.writeToc(); }) + // Write glossary + .then(function() { + return that.writeGlossary(); + }) + // Copy cover .then(function() { return that.copyCover(); |