Skip to content

Instantly share code, notes, and snippets.

@jxson
Created December 11, 2008 23:33
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 jxson/34944 to your computer and use it in GitHub Desktop.
Save jxson/34944 to your computer and use it in GitHub Desktop.
<!-- =============================================== -->
<!-- = 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