From 3f86aa8f02ab3c13f636934f5fdb560d84339bce Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 18 Feb 2018 01:39:54 +0300 Subject: enable post categories --- _layouts/category.html | 19 +++++++++++++++++++ _layouts/post.html | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 _layouts/category.html (limited to '_layouts') diff --git a/_layouts/category.html b/_layouts/category.html new file mode 100644 index 0000000..dbb7825 --- /dev/null +++ b/_layouts/category.html @@ -0,0 +1,19 @@ +{% include common/header.html %} +
+
+

{{ page.title }}

+

This is a complete list of posts in the "{{ page.category }}" category.

+ {% if site.categories[page.category].size > 0 %} +
    + {% for post in site.categories[page.category] %} +
  • {{ post.title }}
  • + {% endfor %} +
+ {% else %} + {% endif %} +
+
+ {% include common/sidebar.html %} +
+
+{% include common/footer.html %} diff --git a/_layouts/post.html b/_layouts/post.html index 187b951..b01892f 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -2,7 +2,7 @@

{{ page.title }}

-

Posted on {{ page.date | date_to_long_string }}

+

 Posted on {{ page.date | date_to_long_string }}{% if page.category %} in  {{ page.category }}{% endif %}

{{ content }}
-- cgit v1.2.3