Skip to content

Instantly share code, notes, and snippets.

@ramontayag
Created September 13, 2010 17:01
Show Gist options
  • Save ramontayag/577630 to your computer and use it in GitHub Desktop.
Save ramontayag/577630 to your computer and use it in GitHub Desktop.
<div class="blog-archive">
<h2>All entries</h2>
<ul id="blog-archive">
{% for children_by_year_then_month in object.children.group_by.published_at_beginning_of_year_then_month %}
{% assign year = children_by_year[0] %}
{% assign children_by_months = children_by_year[1] %}
<li class="year" id="year_{{ year | date: "%Y" }}">
{{ year | date: "%Y" }}
{% for children_by_month in children_by_months %}
{% assign month = children_by_month[0] %}
{% assign children_in_month = children_by_month[1] %}
<ul>
<li class="month">{{ month | date: "%B" }}
<ul>
{% for child_in_month in children_in_month %}
<li>
"{{ child_in_month.name }}":{{child_in_month.path}}
</li>
{% endfor %}
</ul>
</li>
</ul>
{% endfor %}
</li>
{% endfor %}
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment