summaryrefslogtreecommitdiffstats
path: root/lib/backbone
diff options
context:
space:
mode:
Diffstat (limited to 'lib/backbone')
-rw-r--r--lib/backbone/readme.js20
-rw-r--r--lib/backbone/summary.js1
2 files changed, 20 insertions, 1 deletions
diff --git a/lib/backbone/readme.js b/lib/backbone/readme.js
index a4cd9d8..088a942 100644
--- a/lib/backbone/readme.js
+++ b/lib/backbone/readme.js
@@ -11,7 +11,25 @@ util.inherits(Readme, BackboneFile);
Readme.prototype.type = 'readme';
-// Parse the readme content
+/*
+ Return and extension of context to define the readme
+
+ @retrun {Object}
+*/
+Readme.prototype.getContext = function() {
+ return {
+ readme: {
+ path: this.path
+ }
+ };
+};
+
+/*
+ Parse the readme content
+
+ @param {String} content
+ @retrun {Promise}
+*/
Readme.prototype.parse = function(content) {
var that = this;
diff --git a/lib/backbone/summary.js b/lib/backbone/summary.js
index 9c8a38d..2dbcecb 100644
--- a/lib/backbone/summary.js
+++ b/lib/backbone/summary.js
@@ -231,6 +231,7 @@ Summary.prototype.getContext = function() {
return {
summary: {
+ path: this.path,
parts: _.map(this.parts, function(part) {
return part.getContext(onArticle);
})