aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-09-30 04:40:28 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-09-30 04:44:43 +0300
commit3536c1bdd393e956e2fe176d69dd7be49d0d3ef4 (patch)
treee6e36cafbabd66f213fe9e0b338c60a481fec515
parentinherit layouts from default.html (diff)
downloadblog-3536c1bdd393e956e2fe176d69dd7be49d0d3ef4.tar.gz
blog-3536c1bdd393e956e2fe176d69dd7be49d0d3ef4.zip
add categories.html
Diffstat (limited to '')
-rw-r--r--_layouts/category.html3
-rw-r--r--categories.html15
2 files changed, 17 insertions, 1 deletions
diff --git a/_layouts/category.html b/_layouts/category.html
index fa50437..6a5f100 100644
--- a/_layouts/category.html
+++ b/_layouts/category.html
@@ -2,7 +2,7 @@
layout: default
---
<h1>Category: {{ page.title }}</h1>
-<p>This is a complete list of posts in the "{{ page.category }}" category.</p>
+<p>This is a list of posts in the "{{ page.category }}" category.</p>
{% if site.categories[page.category].size > 0 %}
<ul>
{% for post in site.categories[page.category] %}
@@ -10,3 +10,4 @@ layout: default
{% endfor %}
</ul>
{% endif %}
+<p>For a complete list of posts grouped by category, please see <a href="{{ site.baseurl }}/categories.html">this page</a>.</p>
diff --git a/categories.html b/categories.html
new file mode 100644
index 0000000..06f14ce
--- /dev/null
+++ b/categories.html
@@ -0,0 +1,15 @@
+---
+layout: default
+title: Categories
+groups:
+ - navbar
+navbar_link: <span class="glyphicon glyphicon-th-list"></span>&nbsp;Categories
+---
+{% for category in site.categories %}
+ <h1><a class="category" href="{{ site.baseurl }}{{ category[0] | slugify: 'pretty' }}">{{ category[0] }}</a></h1>
+ <ul>
+ {% for post in category[1] %}
+ <li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.date | date: "%Y-%m-%d" }} &mdash; {{ post.title }}</a></li>
+ {% endfor %}
+ </ul>
+{% endfor %}