Add category page

This commit is contained in:
Ngô Ngọc Đức Huy 2021-02-06 20:28:34 +07:00
parent 30e8748fa6
commit e7092c203e
Signed by: huyngo
GPG Key ID: 904AF1C7CDF695C3
1 changed files with 24 additions and 0 deletions

24
categories.html Normal file
View File

@ -0,0 +1,24 @@
---
layout: page
permalink: /categories/
title: Categories
---
<div id="archives">
{% for category in site.categories %}
<div class="archive-group">
{% capture category_name %}{{ category | first }}{% endcapture %}
<div id="#{{ category_name | slugize }}"></div>
<p></p>
<h3 class="category-head">{{ category_name |capitalize }}</h3>
<a name="{{ category_name | slugize }}"></a>
{% for post in site.categories[category_name] %}
<article class="archive-item">
<h4><a href="{{ site.baseurl }}{{ post.url }}">{{post.title}}</a></h4>
</article>
{% endfor %}
</div>
{% endfor %}
</div>