From edecf56dd6b9727b025e6529f0543d3d09222838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Thu, 25 Feb 2016 12:03:33 +0100 Subject: [PATCH] Use hook for configuration --- lib/output/base.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/output/base.js b/lib/output/base.js index 6662443fe..491db9587 100644 --- a/lib/output/base.js +++ b/lib/output/base.js @@ -59,6 +59,14 @@ Output.prototype.generate = function() { }); }) + // Transform the configuration + .then(function() { + return that.plugins.hook('config', that.book.config.dump()) + .then(function(cfg) { + that.book.config.replace(cfg); + }); + }) + // Initialize the generation .then(function() { that.log.info.ln('preparing the generation');