-
-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a simple page listing all posts on the site split into months
- Loading branch information
1 parent
14cf39c
commit cd9462d
Showing
2 changed files
with
34 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
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 | ||
permalink: /archive/ | ||
title: Posts Archive | ||
--- | ||
|
||
|
||
<div id="archives"> | ||
<section id="archive"> | ||
<h3>Most Recent Posts</h3> | ||
{%for post in site.posts %} | ||
{% unless post.next %} | ||
<ul class="this"> | ||
{% else %} | ||
{% capture month %}{{ post.date | date: '%B %Y' }}{% endcapture %} | ||
{% capture nmonth %}{{ post.next.date | date: '%B %Y' }}{% endcapture %} | ||
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %} | ||
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %} | ||
{% if year != nyear %} | ||
</ul> | ||
<h2 style="text-align:left;">{{ post.date | date: '%Y' }}</h2> | ||
<ul class="past"> | ||
{% endif %} | ||
{% if month != nmonth %} | ||
<h3 style="text-align:left;">{{ post.date | date: '%B %Y' }}</h3> | ||
{% endif %} | ||
{% endunless %} | ||
<p><b><a href="{{ site.baseurl }}{{ post.url }}">{% if post.title and post.title != "" %}{{post.title}}{% else %}{{post.excerpt |strip_html}}{%endif%}</a></b> - {% if post.date and post.date != "" %}{{ post.date | date: "%e %B %Y" }}{%endif%}</p> | ||
{% endfor %} | ||
</ul> | ||
<h3>Oldest Posts</h3> | ||
</section> | ||
</div> |