+ {% if site.categories[page.category] %}
+ {% for post in site.categories[page.category] %}
+ {% capture post_year %}{{ post.date | date: '%Y' }}{% endcapture %}
+ {% if forloop.first %}
+
{{ post_year }}
+ {% endif %}
+
+ {% if forloop.first == false %}
+ {% assign previous_index = forloop.index0 | minus: 1 %}
+ {% capture previous_post_year %}{{ site.categories[page.category][previous_index].date | date: '%Y' }}{% endcapture %}
+ {% if post_year != previous_post_year %}
+
{{ post_year }}
+ {% endif %}
+ {% endfor %}
+ {% else %}
+
There are no posts in this category.
+ {% endif %}
+
\ No newline at end of file
diff --git a/_layouts/blog_by_tag.html b/_layouts/blog_by_tag.html
new file mode 100644
index 0000000..69ea789
--- /dev/null
+++ b/_layouts/blog_by_tag.html
@@ -0,0 +1,37 @@
+---
+layout: default
+---
+
+
+
+
+ {% if site.tags[page.tag] %}
+ {% for post in site.tags[page.tag] %}
+ {% capture post_year %}{{ post.date | date: '%Y' }}{% endcapture %}
+ {% if forloop.first %}
+
{{ post_year }}
+ {% endif %}
+
+ {% if forloop.first == false %}
+ {% assign previous_index = forloop.index0 | minus: 1 %}
+ {% capture previous_post_year %}{{ site.tags[page.tag][previous_index].date | date: '%Y' }}{% endcapture %}
+ {% if post_year != previous_post_year %}
+
{{ post_year }}
+ {% endif %}
+ {% endfor %}
+ {% else %}
+
There are no posts for this tag.
+ {% endif %}
+
\ No newline at end of file
diff --git a/_layouts/post.html b/_layouts/post.html
index 288aaf3..fb75435 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -2,6 +2,8 @@
layout: default
---
+{% assign post = page %}
+
{{page.title}}
@@ -9,6 +11,38 @@ layout: default
{{page.date | date: "%B %d, %Y" }}
/
by {{page.author}}
+
+ {% if post.category %}
+ {% for site_category in site.data.categories %}
+ {% if site_category.slug == post.category %}
+ {% assign category = site_category %}
+ {% endif %}
+ {% endfor %}
+ {% if category %}
+ {% capture category_content %} in {{ category.name }}{% endcapture %}
+ {% endif %}
+ {% else %}
+ {% assign category_content = '' %}
+ {% endif %}
+
+ {% if post.tags.size > 0 %}
+ {% capture tags_content %} with {% if post.tags.size == 1 %}{% else %}{% endif %}: {% endcapture %}
+ {% for post_tag in post.tags %}
+ {% for data_tag in site.data.tags %}
+ {% if data_tag.slug == post_tag %}
+ {% assign tag = data_tag %}
+ {% endif %}
+ {% endfor %}
+ {% if tag %}
+ {% capture tags_content_temp %}{{ tags_content }}{{ tag.name }}{% if forloop.last == false %}, {% endif %}{% endcapture %}
+ {% assign tags_content = tags_content_temp %}
+ {% endif %}
+ {% endfor %}
+ {% else %}
+ {% assign tags_content = '' %}
+ {% endif %}
+
+ Posted {{ category_content }}{{ tags_content }}