summaryrefslogtreecommitdiffstats
path: root/lib/generate/page/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/generate/page/index.js')
-rw-r--r--lib/generate/page/index.js30
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;
});
};