diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-09 01:14:04 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-09 01:14:04 +0300 |
commit | 098a4c938bc63f9a754637a017cb193033564141 (patch) | |
tree | 636cea1601fd7f603e6f425fd7281d08cf54c9fc | |
parent | category.html should be an include, not a layout (diff) | |
download | jekyll-theme-098a4c938bc63f9a754637a017cb193033564141.tar.gz jekyll-theme-098a4c938bc63f9a754637a017cb193033564141.zip |
_includes: add categories.html
Diffstat (limited to '')
-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 %} |