Archive in Mephisto

So, I could not find this anywhere – at least not detailed out enough for my small brain. Here is a short how-to on creating monthly archives in Mephisto, using Liquid….

1
2
3
4
5
6
7
8
9
10
11
<h1>Archives</h1>
      {% if section.months.size > 0 %}
        <ul>
        {% for month in section.months %}
          <li><a href="{{ section | monthly_url: month }}">
                    {{ month | format_date: 'my' }} 
                    <strong>&#187;</strong> 
                     {{ section | monthly_articles: month | size }}</a></li>
        {% endfor %}
        </ul>
      {% endif %}

Pretty slick – it took me a bit of digging to find all of this stuff and put it together.

Leave a Reply