Skip to content

Instantly share code, notes, and snippets.

@parkr
Last active August 29, 2015 14:01
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 parkr/cf27484fd03ea65f0c4d to your computer and use it in GitHub Desktop.
Save parkr/cf27484fd03ea65f0c4d to your computer and use it in GitHub Desktop.
---
layout: yearly
year: 2013
---
---
layout: yearly
year: 2014
---
---
layout: default
---
<!-- I go in _layouts/yearly.html -->
<h2>{{ page.year }}</h2>
{% assign yearString = page.year | append: "-" %}
<ul>
{% for post in site.posts %}
{% assign xmldate = post.date | date_to_xmlschema %}
{% if xmldate contains yearString %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment