Fixed monthly archives to respect MONTH_ARCHIVE_SAVE_AS setting
This commit is contained in:
@@ -88,7 +88,7 @@
|
|||||||
<li><label>Monthly Archives</label></li>
|
<li><label>Monthly Archives</label></li>
|
||||||
{% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
|
{% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
|
||||||
{% for month, articles in date_year|groupby( 'date.month' )|sort(reverse=True) %}
|
{% for month, articles in date_year|groupby( 'date.month' )|sort(reverse=True) %}
|
||||||
<li><a href="/posts/{{ year }}/{{ articles[0].date.strftime('%m') }}/">{{ articles[0].date.strftime('%B') }} {{ year }} ({{ articles|count }})</a></li>
|
<li><a href="/{{ MONTH_ARCHIVE_SAVE_AS.format(date=articles[0].date) }}">{{ articles[0].date.strftime('%B') }} {{ year }} ({{ articles|count }})</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
<ul class="side-nav">
|
<ul class="side-nav">
|
||||||
{% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
|
{% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
|
||||||
{% for month, articles in date_year|groupby( 'date.month' )|sort(reverse=True) %}
|
{% for month, articles in date_year|groupby( 'date.month' )|sort(reverse=True) %}
|
||||||
<li><a href="/posts/{{ year }}/{{ articles[0].date.strftime('%m') }}/">{{ articles[0].date.strftime('%B') }} {{ year }} ({{ articles|count }})</a></li>
|
<li><a href="/{{ MONTH_ARCHIVE_SAVE_AS.format(date=articles[0].date) }}">{{ articles[0].date.strftime('%B') }} {{ year }} ({{ articles|count }})</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -199,4 +199,4 @@
|
|||||||
$(document).foundation();
|
$(document).foundation();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user