-
Notifications
You must be signed in to change notification settings - Fork 2
/
categories.html
41 lines (39 loc) · 1.28 KB
/
categories.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
layout: page
permalink: /categories/
title: Categories
---
<section class="posts-grid">
<div>
{% for category in site.categories %}
{% capture category_name %}{{ category | first }}{% endcapture %}
<a href="{{site.baseurl}}/categories/#{{category_name|slugize}}">#{{ category_name }}</a>
{% endfor %}
</div>
{% for category in site.categories %}
<div class="archive-group">
{% capture category_name %}{{ category | first }}{% endcapture %}
<a name="{{ category_name | slugize }}"></a>
<h2>{{category_name}}</h2>
<hr>
{% for post in site.categories[category_name] %}
<article class="posts-grid__item">
<a href="{{ site.baseurl }}{{ post.url }}" class="posts-grid__link">
<h3 class="posts-grid__item-title">
{{ post.title }}
</h3>
</a>
<p class="posts-grid__summary">{{ post.excerpt| strip_html }}</p>
<div class="posts-grid__meta">
<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_long_string }}</time>
<span> -
{% for category in post.categories %}
<a href="{{site.baseurl}}/categories/#{{category|slugize}}">{{ category }}</a>
{% endfor %}
</span>
</div>
</article>
{% endfor %}
</div>
{% endfor %}
</section>