-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #426 from Soroosh/archive
Add blog archive page
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
layout: archive | ||
title: "Blog Archive" | ||
permalink: /archive/ | ||
hide: true | ||
excluded: true | ||
icon: "fa-archive" | ||
position: 6 | ||
--- |