summaryrefslogtreecommitdiffstats
path: root/lib/output/website.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-22 11:15:34 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-22 11:15:34 +0100
commitd8fd6430ed5e15d0dee33f730fb6e8e8346c866a (patch)
treebbcea5d18efe6186d6cc7dd22630f6b70065c68d /lib/output/website.js
parent1e243281c7f0444162dfb8593e9fd9ac2aa725ab (diff)
downloadgitbook-d8fd6430ed5e15d0dee33f730fb6e8e8346c866a.zip
gitbook-d8fd6430ed5e15d0dee33f730fb6e8e8346c866a.tar.gz
gitbook-d8fd6430ed5e15d0dee33f730fb6e8e8346c866a.tar.bz2
Copy plugins resources to website output
Diffstat (limited to 'lib/output/website.js')
-rw-r--r--lib/output/website.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/output/website.js b/lib/output/website.js
index 929c82f..30e0e8c 100644
--- a/lib/output/website.js
+++ b/lib/output/website.js
@@ -174,6 +174,21 @@ WebsiteOutput.prototype.onPage = function(page) {
});
};
+// Finish generation, create ebook using ebook-convert
+WebsiteOutput.prototype.finish = function() {
+ var that = this;
+
+ return Promise()
+ .then(function() {
+ return WebsiteOutput.super_.prototype.finish.apply(that);
+ })
+
+ // Copy assets from plugins
+ .then(function() {
+ return that.plugins.copyResources('website', that.resolve('gitbook'));
+ });
+};
+
// ----- Utilities ----
// Render a template using nunjucks