From 098a4c938bc63f9a754637a017cb193033564141 Mon Sep 17 00:00:00 2001 From: Egor Tensin <Egor.Tensin@gmail.com> Date: Fri, 9 Apr 2021 01:14:04 +0300 Subject: _includes: add categories.html --- _includes/categories/categories.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 _includes/categories/categories.html (limited to '_includes/categories/categories.html') diff --git a/_includes/categories/categories.html b/_includes/categories/categories.html new file mode 100644 index 0000000..c5a60f3 --- /dev/null +++ b/_includes/categories/categories.html @@ -0,0 +1,14 @@ +{% if site.categories.size != 0 %} + {% for category in site.categories %} + <h1><a class="category" href="{{ site.baseurl }}/categories/{{ category[0] | slugify: 'pretty' }}">{{ category[0] }}</a></h1> + <hr/> + <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 %} +{% else %} + <p>Sorry, no posts have been added yet.</p> + <hr/> +{% endif %} -- cgit v1.2.3