Skip to content

Instantly share code, notes, and snippets.

@csu
Created April 13, 2014 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csu/10606903 to your computer and use it in GitHub Desktop.
Save csu/10606903 to your computer and use it in GitHub Desktop.
Jekyll Archive Template
---
layout: page
title: Archive
---
<main class="content" role="main">
<br />
<section id="archive">
<h3>2014</h3>
{%for post in site.posts %}
{% unless post.next %}
<ul class="this">
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
</ul>
<h3>{{ post.date | date: '%Y' }}</h3>
<ul class="past">
{% endif %}
{% endunless %}
<li><code><time>{{ post.date | date:"%d %b" }}</time>:</code> <a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</section>
</main>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment