From 1b9dca8f918c3e4df336dacf2f4701a738927f00 Mon Sep 17 00:00:00 2001 From: Raymond Camden Date: Mon, 17 Aug 2015 05:38:20 -0500 Subject: [PATCH 1/2] support dynamic year --- public/_partials/footer.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/_partials/footer.jade b/public/_partials/footer.jade index 826731f..450499d 100644 --- a/public/_partials/footer.jade +++ b/public/_partials/footer.jade @@ -2,7 +2,7 @@ footer .container .row .col-sm-6 - p: small © 2013 #{ site_title } + p: small © #{(new Date()).getFullYear()} #{ site_title } .col-sm-6 p.pull-right small: a(href="/rss.xml", title="#{ site_title } RSS feed") From d4f1d008891614b3d030cf5345bb8cc8f81f7b78 Mon Sep 17 00:00:00 2001 From: Raymond Camden Date: Mon, 17 Aug 2015 05:46:20 -0500 Subject: [PATCH 2/2] Adds support for partial blog entries on the home page and demos it in one post --- public/index.jade | 5 +++++ public/posts/hello-world.jade | 2 ++ 2 files changed, 7 insertions(+) diff --git a/public/index.jade b/public/index.jade index a2b3d32..e47ac57 100644 --- a/public/index.jade +++ b/public/index.jade @@ -1,2 +1,7 @@ +- function excerpt(content) { + - if(content.indexOf("") == -1) return content; + - else return content.split("")[0]; +- } + each post, slug in public.posts._data != partial("/posts/" + slug, post) \ No newline at end of file diff --git a/public/posts/hello-world.jade b/public/posts/hello-world.jade index 6b7eac2..d08bbc5 100644 --- a/public/posts/hello-world.jade +++ b/public/posts/hello-world.jade @@ -6,6 +6,8 @@ p Lorem ipsum Sunt occaecat exercitation quis voluptate tempor non dolore tempor p: img.img-responsive(src="http://placekitten.com/g/500/300") + + p Laborum ut aliqua eu fugiat sed laboris consectetur culpa anim deserunt eiusmod esse sunt commodo dolore ex amet irure ut tempor exercitation magna sit voluptate cupidatat adipisicing velit reprehenderit nostrud enim cupidatat id fugiat eu dolor laborum consectetur velit magna laboris incididunt nostrud sint exercitation id aliqua in Duis laboris cillum proident aliqua dolore et incididunt cillum in exercitation id veniam ex Ut dolore quis blockquote