Skip to content

Instantly share code, notes, and snippets.

@TangChr
Last active June 6, 2016 08:42
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 TangChr/72cdfdd3dc1e25eddc75 to your computer and use it in GitHub Desktop.
Save TangChr/72cdfdd3dc1e25eddc75 to your computer and use it in GitHub Desktop.
Liquid/Jekyll: Monthly Archive
<ul class="post-archive">
{% for p in site.posts %}
<li>
{% assign fdate = p.date | date: '%b %Y' %}
{% if cur_date != fdate %}
{% assign cur_date = fdate %}
<h3>{{ p.date | date: '%B, %Y' }}</h3>
{% endif %}
<a href="{{ p.url }}">{{ p.title }}</a>
</li>
{% endfor %}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment