diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-09-30 04:40:28 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-09-30 04:44:43 +0300 |
commit | 3536c1bdd393e956e2fe176d69dd7be49d0d3ef4 (patch) | |
tree | e6e36cafbabd66f213fe9e0b338c60a481fec515 | |
parent | inherit layouts from default.html (diff) | |
download | blog-3536c1bdd393e956e2fe176d69dd7be49d0d3ef4.tar.gz blog-3536c1bdd393e956e2fe176d69dd7be49d0d3ef4.zip |
add categories.html
-rw-r--r-- | _layouts/category.html | 3 | ||||
-rw-r--r-- | categories.html | 15 |
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> 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" }} — {{ post.title }}</a></li> + {% endfor %} + </ul> +{% endfor %} |