diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-09-17 13:08:30 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-09-17 13:08:30 +0200 |
commit | 11b299653f64eff2c997602bdd29cf07b6fa80e8 (patch) | |
tree | 1f818c2c1ce9dead652ffaf648adc57a2dd04d95 /lib/generate/page/index.js | |
parent | c8c07fe8ce7ccc3b4a83412025123cc05853dc40 (diff) | |
download | gitbook-11b299653f64eff2c997602bdd29cf07b6fa80e8.zip gitbook-11b299653f64eff2c997602bdd29cf07b6fa80e8.tar.gz gitbook-11b299653f64eff2c997602bdd29cf07b6fa80e8.tar.bz2 |
Remove githubId
Enable hook for ebook
Diffstat (limited to 'lib/generate/page/index.js')
-rw-r--r-- | lib/generate/page/index.js | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/lib/generate/page/index.js b/lib/generate/page/index.js index a013219..9e48a5e 100644 --- a/lib/generate/page/index.js +++ b/lib/generate/page/index.js @@ -37,33 +37,9 @@ Generator.prototype.convertFile = function(content, input) { progress: parse.progress(this.options.navigation, input) }; - var _callHook = function(name) { - return that.callHook(name, json) - .then(function(_page) { - json = _page; - return json; - }); - }; - - return Q() - .then(function() { - return parse.page(content, { - repo: that.options.githubId, - dir: path.dirname(input) || '/', - outdir: './', - singleFile: true - }); - }) - .then(function(sections) { - json.content = sections; - }) - .then(function(sections) { - - // Use plugin hook - return _callHook("ebook:page"); - }) - .then(function() { - that.pages[input] = json; + return this.prepareFile(content, input) + .then(function(page) { + that.pages[input] = page; }); }; |