Skip to content

Instantly share code, notes, and snippets.

@nerdburn
Created October 22, 2014 20:46
Show Gist options
  • Save nerdburn/5532e681afa0e68a7803 to your computer and use it in GitHub Desktop.
Save nerdburn/5532e681afa0e68a7803 to your computer and use it in GitHub Desktop.
{% for year, items in sort_by_year(posts) %}
<h2>{{ year }}</h2>
<ul class="posts">
{% for post in items %}
<li>
<article itemscope itemtype="http://schema.org/Article">
<time datetime="{{ post.created_at }}">{{ post.created_at.strftime('%d %b') }}</time> <a href="{{ post.permalink }}" class="permalink">{{ post.title }}</a>
<div class="post-tags">
{{ post.tags|format_tags(humanize=True) }}
</div>
</article>
</li>
{% endfor %}
</ul>
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment