diff options
Diffstat (limited to 'lib/page/index.js')
-rw-r--r-- | lib/page/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/page/index.js b/lib/page/index.js index d057441..6911ce2 100644 --- a/lib/page/index.js +++ b/lib/page/index.js @@ -106,13 +106,17 @@ 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); + return { file: { path: this.path, mtime: this.mtime }, page: { - // todo + title: article? article.title : null, + next: article? article.next() : null, + previous: article? article.prev() : null } }; }; |