summaryrefslogtreecommitdiffstats
path: root/lib/page/index.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-14 22:49:55 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-14 22:49:55 +0100
commitfef822145d43d80dbbefa8712eab88ad7044d6c1 (patch)
tree611af2ef4292e9e9a918c2840db2a65b7efdd587 /lib/page/index.js
parentcfefa7d57992738373649dab16cbaf4754c3e5c7 (diff)
downloadgitbook-fef822145d43d80dbbefa8712eab88ad7044d6c1.zip
gitbook-fef822145d43d80dbbefa8712eab88ad7044d6c1.tar.gz
gitbook-fef822145d43d80dbbefa8712eab88ad7044d6c1.tar.bz2
Move conrefs to a separate mixin
Diffstat (limited to 'lib/page/index.js')
-rw-r--r--lib/page/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/page/index.js b/lib/page/index.js
index 6911ce2..51416f0 100644
--- a/lib/page/index.js
+++ b/lib/page/index.js
@@ -106,7 +106,7 @@ Page.prototype.read = function() {
// Return templating context for this page
// This is used both for themes and page parsing
Page.prototype.getContext = function() {
- var article = this.book.summary.find(this);
+ var article = this.book.summary.getArticle(this);
return {
file: {
@@ -122,7 +122,7 @@ Page.prototype.getContext = function() {
};
// Parse the page and return its content
-Page.prototype.parse = function(output) {
+Page.prototype.toHTML = function(output) {
var that = this;
this.log.debug.ln('start parsing file', this.path);
@@ -137,7 +137,7 @@ Page.prototype.parse = function(output) {
// Render template
.then(function() {
- return that.book.template.renderString(that.content, that.getContext(), {
+ return output.template.renderString(that.content, that.getContext(), {
file: that.path
})
.then(that.update);