From 62c9780c677a2750d8942773dffedbb1045a8f4b Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Mon, 27 Jun 2011 17:38:51 -0400 Subject: [PATCH] Added archive_post partial Added post_category partial Added archives page --- .../classic/source/_includes/archive_post.html | 8 ++++++++ .../source/_includes/post_categories.html | 10 ++++++++++ themes/classic/source/archives.html | 17 +++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 themes/classic/source/_includes/archive_post.html create mode 100644 themes/classic/source/_includes/post_categories.html create mode 100644 themes/classic/source/archives.html diff --git a/themes/classic/source/_includes/archive_post.html b/themes/classic/source/_includes/archive_post.html new file mode 100644 index 0000000..cd55c21 --- /dev/null +++ b/themes/classic/source/_includes/archive_post.html @@ -0,0 +1,8 @@ +{% capture category %}{{ post.categories | size }}{% endcapture %} +

{{post.title}}

+ +{% if category != '0' %} + +{% endif %} diff --git a/themes/classic/source/_includes/post_categories.html b/themes/classic/source/_includes/post_categories.html new file mode 100644 index 0000000..7bf7528 --- /dev/null +++ b/themes/classic/source/_includes/post_categories.html @@ -0,0 +1,10 @@ +{% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %} +{% unless category == '0' %} + in + {% if post %} + {{ post.categories | category_links }} + {% else %} + {{ page.categories | category_links }} + {% endif %} + +{% endunless %} diff --git a/themes/classic/source/archives.html b/themes/classic/source/archives.html new file mode 100644 index 0000000..ebf447c --- /dev/null +++ b/themes/classic/source/archives.html @@ -0,0 +1,17 @@ +--- +layout: post +title: Blog Archive +no_meta: true +--- +
+{% for post in site.posts reverse %} +{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} +{% unless year == this_year %} + {% assign year = this_year %} +

{{ year }}

+{% endunless %} +
+ {% include archive_post.html %} +
+{% endfor %} +