Created
October 16, 2011 17:29
-
-
Save destroytoday/1291168 to your computer and use it in GitHub Desktop.
Month-separated blog post list in Jekyll w/ Liquid
This file contains hidden or 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
--- | |
layout: default | |
title: All Posts | |
category: blog | |
--- | |
<div id="blog"> | |
<h2>{{page.title}}</h2> | |
{% for post in site.categories.blog %} | |
{% capture post_month %}{{post.date | date: "%m"}}{% endcapture %} | |
{% if post_month != prev_post_month %}{% if prev_post_month %}</ol>{% endif %}<h3>{{post.date | date: "%B %Y"}}</h3><ol class="blog-list">{% endif %} | |
{% include blog-list-post.html %} | |
{% capture prev_post_month %}{{post_month}}{% endcapture %} | |
{% endfor %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment