-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.html
35 lines (31 loc) · 982 Bytes
/
archive.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
---
layout: default
title: All Posts
permalink: /posts/
---
<div class="archive-header">
<h1>All Posts</h1>
</div>
<div class="archive-content">
{% assign postsByYear = site.posts | group_by_exp:"post", "post.date | date: '%Y'" %}
{% for year in postsByYear %}
<div class="year-section">
<h2>{{ year.name }}</h2>
<ul class="posts-by-year">
{% for post in year.items %}
<li class="archive-post-item">
<span class="post-date">{{ post.date | date: "%B %-d" }}</span>
<a href="{{ post.url | relative_url }}" class="post-link">{{ post.title }}</a>
{% if post.categories.size > 0 %}
<div class="post-categories">
{% for category in post.categories %}
<span class="category">{{ category }}</span>
{% endfor %}
</div>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>