-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwritings.html
41 lines (40 loc) · 1.22 KB
/
writings.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: /writings/
title: Writings
---
<section class="posts-grid">
{%- assign posts = collections.posts -%} {%- assign groupedByYear = posts |
group_by_exp:"post","post.date | date:'%Y' " -%} {%- for yearitem in
groupedByYear -%}
<yearlist>
<header class="posts-grid__header">
<h2>{{ yearitem.name }}</h2>
[{{yearitem.items|size}} posts]
</header>
<hr />
<list>
{%- for item in yearitem.items -%}
<article class="posts-grid__item">
<a href="{{ site.baseurl }}{{ item.url }}" class="posts-grid__link">
<h3 class="posts-grid__item-title">{{ item.data.title }}</h3>
</a>
<p class="posts-grid__summary">{{ item.content| excerpt }}</p>
<div class="posts-grid__meta">
<time datetime="{{ item.date | date_to_xmlschema }}"
>{{ item.date | date_to_long_string_locale }}</time
>
<span>
- {% for category in item.data.categories %}
<a href="{{site.baseurl}}/categories/#{{category|slugify}}"
>{{ category }}</a
>
{% endfor %}
</span>
</div>
</article>
{% endfor %}
</list>
</yearlist>
{% endfor %}
</section>