aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes/categories/categories.html
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-04-09 01:14:04 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-04-09 01:14:04 +0300
commit098a4c938bc63f9a754637a017cb193033564141 (patch)
tree636cea1601fd7f603e6f425fd7281d08cf54c9fc /_includes/categories/categories.html
parentcategory.html should be an include, not a layout (diff)
downloadjekyll-theme-098a4c938bc63f9a754637a017cb193033564141.tar.gz
jekyll-theme-098a4c938bc63f9a754637a017cb193033564141.zip
_includes: add categories.html
Diffstat (limited to '')
-rw-r--r--_includes/categories/categories.html14
1 files changed, 14 insertions, 0 deletions
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" }} &mdash; {{ post.title }}</a></li>
+ {% endfor %}
+ </ul>
+ {% endfor %}
+{% else %}
+ <p>Sorry, no posts have been added yet.</p>
+ <hr/>
+{% endif %}