Skip to content

Instantly share code, notes, and snippets.

@stammy
Created January 22, 2011 02:17
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stammy/790789 to your computer and use it in GitHub Desktop.
Save stammy/790789 to your computer and use it in GitHub Desktop.
Jekyll archives.html page
---
layout: default
title: Archives
---
<div id="post">
<h1>Archives</h1>
<p>All posts can be found on this page or by <a href="{{site.base_url}}/search" title="Search">searching</a>. Bits (short-form pieces) are not included here and have <a href="{{site.base_url}}/bits" title="Bits">their own section</a>.</p><br/>
{% for year in (2005..2015) reversed %}
{% if site.collated_posts[year] %}
<h2 class="archives">{{ year }}</h2>
{% endif %}
{% for month in (1..12) reversed %}
{% if site.collated_posts[year][month] %}
<h3>{{ month | to_month }}</h3>
<ul class="archive-page">
{% for day in (1..31) reversed %}
{% if site.collated_posts[year][month][day] %}
{% for post in site.collated_posts[year][month][day] reversed %}
<li><a href='{{ site.base_url }}{{ post.url }}' title="{{ post.title }}">{{ post.title }}</a></li>
{% endfor %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% endfor %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment