From 2ef2ff68bf96bd9ab5a11e8dda74a774d329e2d9 Mon Sep 17 00:00:00 2001 From: John O'Nolan Date: Sun, 1 Sep 2013 17:02:37 +0200 Subject: [PATCH] Added descriptive handlebars comments to help new developers --- index.hbs | 12 ++++++++++-- post.hbs | 14 +++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/index.hbs b/index.hbs index 218bd63..388710b 100644 --- a/index.hbs +++ b/index.hbs @@ -1,5 +1,9 @@ {{!< default}} +{{! The comment above "< default" means - insert everything in this file into + the {body} of the default.hbs template, which contains our header/footer. }} + +{{! The big featured header on the homepage, with the site logo and description }} +{{! The main content area on the homepage }}
+ {{! Each post will be output using this markup }} {{#foreach posts}} - + {{/foreach}} - + + {{!! After all the posts, we have the previous/next pagination links }} {{pagination}} +
\ No newline at end of file diff --git a/post.hbs b/post.hbs index 6687d8a..a8cf59f 100644 --- a/post.hbs +++ b/post.hbs @@ -1,20 +1,24 @@ {{!< default}} -
+{{! The comment above "< default" means - insert everything in this file into + the {body} of the default.hbs template, which contains our header/footer. }} +
+ + {{! Everything inside the #post tags is the template used to ourput the post }} {{#post}}
- + + {{! Each post has the blog logo at the top, with a link back to the homage page }}
- -
+ {{! Everything below outputs content of the the post which has been published }} +

{{title}}

-
{{content}}