diff options
-rw-r--r-- | _includes/categories/categories.html | 14 |
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" }} — {{ post.title }}</a></li> + {% endfor %} + </ul> + {% endfor %} +{% else %} + <p>Sorry, no posts have been added yet.</p> + <hr/> +{% endif %} |