-
Notifications
You must be signed in to change notification settings - Fork 8
/
archive.liquid
44 lines (36 loc) · 1.05 KB
/
archive.liquid
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
42
43
44
---
permalink: /archive
title: archive
layout: default.liquid
data:
route: archive
---
This is a quick work around until I've had a good think about a way to organise
the archive.
<h2>2019</h2>
<ul>
{% for post in collections.posts.pages %}
{% assign year = post.permalink | truncate: 4, "" %}
{% if year == "2019" %}
<li><a href="/{{ post.permalink }}">{{ post.title }}</a> - {{ post.content | strip_html | truncatewords: 25, '...' }}</li>
{% endif %}
{% endfor %}
</ul>
<h2>2018</h2>
<ul>
{% for post in collections.posts.pages %}
{% assign year = post.permalink | truncate: 4, "" %}
{% if year == "2018" %}
<li><a href="/{{ post.permalink }}">{{ post.title }}</a> - {{ post.content | strip_html | truncatewords: 25, '...' }}</li>
{% endif %}
{% endfor %}
</ul>
<h2>2017</h2>
<ul>
{% for post in collections.posts.pages %}
{% assign year = post.permalink | truncate: 4, "" %}
{% if year == "2017" %}
<li><a href="/{{ post.permalink }}">{{ post.title }}</a> - {{ post.content | strip_html | truncatewords: 25, '...' }}</li>
{% endif %}
{% endfor %}
</ul>