From 1547ba45cb5ec05e15aa0b2415acd061975df2e7 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 6 Jul 2018 16:12:35 -0400 Subject: [PATCH] Extract out recent news section --- _includes/recent-news.html | 10 ++++++++++ _layouts/main.html | 12 +----------- 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 _includes/recent-news.html diff --git a/_includes/recent-news.html b/_includes/recent-news.html new file mode 100644 index 00000000..f24760b4 --- /dev/null +++ b/_includes/recent-news.html @@ -0,0 +1,10 @@ +

Recent News

+ {% for post in site.posts limit:3 %} +

+ {{ post.title }} +

+ {{post.date | date: "%b %d %Y" }} +
+ {{ post.excerpt }} + {% endfor %} + diff --git a/_layouts/main.html b/_layouts/main.html index a81ae5c3..dce6b2e9 100644 --- a/_layouts/main.html +++ b/_layouts/main.html @@ -64,17 +64,7 @@
{{ content }} - - Recent News - - {% for post in site.posts limit:3 %} -

- {{ post.title }} -

- {{post.date | date: "%b %d %Y" }} -
- {{ post.excerpt }} - {% endfor %} + {% if page.title == "Cyclone Scheme" %}{% include recent-news.html %}{% endif %}