{{ content }}
@@ -23,11 +25,10 @@ layout: default
-
{% endif %}
{% capture hasSimilar %}{{ hasSimilar }}*{% endcapture %}
{% assign postHasSimilar = true %}
diff --git a/_layouts/posts_by_category.html b/_layouts/posts_by_category.html
new file mode 100644
index 0000000..685d7ca
--- /dev/null
+++ b/_layouts/posts_by_category.html
@@ -0,0 +1,49 @@
+---
+layout: default
+---
+
+
- {{ post.title }} » {{ post.date | date_to_string }} +
Articles by category: {{ page.categories }}
+
+
+ {% for category in site.categories %} + {% capture category_slug %}{{ category | first }}{% endcapture %} + {% for c_slug in category_slug %} + {% if c_slug == page.categories %} + + {% else %} + {{ c_slug }} + {% endif %} + {% endfor %} + {% endfor %} +
+ + {% if site.categories[page.categories] %} + {% for post in site.categories[page.categories] %} + {% capture post_year %}{{ post.date | date: '%Y' }}{% endcapture %} + {% if forloop.first %} +
\ No newline at end of file
diff --git a/_posts/2013-12-23-welcome-to-simply-grey.markdown b/_posts/2013-12-23-welcome-to-simply-grey.markdown
index 1d4ed27..222bda2 100644
--- a/_posts/2013-12-23-welcome-to-simply-grey.markdown
+++ b/_posts/2013-12-23-welcome-to-simply-grey.markdown
@@ -2,7 +2,7 @@
layout: post
title: "Welcome to Simply Grey"
date: 2013-12-23 00:18:23 +0700
-categories: [simplygrey]
+categories: [jekyll]
---
SimplyGrey is a simple, easy to use theme for Jekyll that compromises of mainly grey colours. A lot of people enjoy the simplistic look of grey and also find it easier to read.
diff --git a/_posts/2016-04-19-welcome-to-jekyll.markdown b/_posts/2016-04-19-welcome-to-jekyll.markdown
index 2e057b4..61fca6e 100644
--- a/_posts/2016-04-19-welcome-to-jekyll.markdown
+++ b/_posts/2016-04-19-welcome-to-jekyll.markdown
@@ -2,7 +2,7 @@
layout: post
title: "Welcome to Jekyll!"
date: 2013-02-19 21:28:15 +0700
-categories: [jekyll, update]
+categories: [jekyll]
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
diff --git a/category/bash.md b/category/bash.md
new file mode 100644
index 0000000..e93af93
--- /dev/null
+++ b/category/bash.md
@@ -0,0 +1,6 @@
+---
+layout: posts_by_category
+categories: bash
+title: Bash
+permalink: /category/bash
+---
\ No newline at end of file
diff --git a/category/django.md b/category/django.md
new file mode 100644
index 0000000..27d525b
--- /dev/null
+++ b/category/django.md
@@ -0,0 +1,6 @@
+---
+layout: posts_by_category
+categories: django
+title: Django
+permalink: /category/django
+---
\ No newline at end of file
diff --git a/category/jekyll.md b/category/jekyll.md
new file mode 100644
index 0000000..4d95131
--- /dev/null
+++ b/category/jekyll.md
@@ -0,0 +1,6 @@
+---
+layout: posts_by_category
+categories: jekyll
+title: Jekyll
+permalink: /category/jekyll
+---
\ No newline at end of file
diff --git a/category/python.md b/category/python.md
new file mode 100644
index 0000000..3e85baf
--- /dev/null
+++ b/category/python.md
@@ -0,0 +1,6 @@
+---
+layout: posts_by_category
+categories: python
+title: Python
+permalink: /category/python
+---
\ No newline at end of file
diff --git a/category/ruby.md b/category/ruby.md
new file mode 100644
index 0000000..4d99243
--- /dev/null
+++ b/category/ruby.md
@@ -0,0 +1,6 @@
+---
+layout: posts_by_category
+categories: ruby
+title: Ruby
+permalink: /category/ruby
+---
\ No newline at end of file
+ {% for category in site.categories %} + {% capture category_slug %}{{ category | first }}{% endcapture %} + {% for c_slug in category_slug %} + {% if c_slug == page.categories %} + + {% else %} + {{ c_slug }} + {% endif %} + {% endfor %} + {% endfor %} +
+ + {% if site.categories[page.categories] %} + {% for post in site.categories[page.categories] %} + {% 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.categories][previous_index].date | date: '%Y' }}{% endcapture %}
+ {% if post_year != previous_post_year %}
+
{{ post_year }}
+ {% endif %}
+ {% endif %}
+
+
+ {% endif %}
+ {% endfor %}
+ {% else %}
+ -
+
There are no posts in this categories.
+ {% endif %} +