Created
December 11, 2008 23:33
-
-
Save jxson/34944 to your computer and use it in GitHub Desktop.
This file contains 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
<!-- =============================================== --> | |
<!-- = Quick reference for adding a list of = --> | |
<!-- = articles by month for a section in Mephisto = --> | |
<!-- =============================================== --> | |
<h2>Archive By Month</h2> | |
{% if section.months.size > 0 %} | |
<ul class="archive"> | |
{% for month in section.months %} | |
{{ section | monthly_articles: month | size | assign_to: 'size' }} | |
{{ section | monthly_articles: month | assign_to: 'month_articles' }} | |
<li><a href="{{ section | monthly_url: month }}">{{ month | format_date: 'my' }} ({{ size }})</a> | |
{% if size > 0 %} | |
<ul> | |
{% for article in month_articles %} | |
<li><a href="{{article.link}}">{{ article.title }} ({{ article.comments_count | pluralize: 'Comment','Comments' }}) <small>Published: {{ article.published_at | format_date: 'mdy', true }}</small></a></li> | |
{% endfor %} | |
</ul> | |
{% endif %} | |
</li> | |
{% endfor %} | |
</ul> | |
{% endif %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment