Skip to content

Commit

Permalink
archive
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyZXi authored Jun 21, 2024
1 parent f099513 commit 4dd4bd7
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
34 changes: 34 additions & 0 deletions _layouts/archive.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
layout: page
---

<div class="home">
<div id="archive">
{% assign postsByYear = site.posts | group_by_exp:"post", "post.date | date: '%Y'" %}
<ul class="archive-clouds">
{% for year in postsByYear %}
<a href="#archive-{{ year.name | cgi_escape }}" class="archive-anchor">
<li>
{{ year.name | cgi_escape }} ({{year.items.size}})
</li>
</a>
{% endfor %}
</ul>
{% for year in postsByYear %}
<div class="archive-group">
<h4 id="archive-{{year.name}}" class="title">{{ year.name }} ({{year.items.size}})</h4>
<div class="items">
{% for post in year.items %}
<a href="{{ post.url | relative_url }}" class="archive-post-link">
<div class="item">
<p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
<p class="title">{{ post.title }}</p>
</div>
</a>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>

9 changes: 9 additions & 0 deletions pages/archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: archive
title: “Archive”
permalink: /archive/
hide: true
excluded: true
icon: "fa-archive"
position: 6
---

0 comments on commit 4dd4bd7

Please sign in to comment.