Skip to content
Snippets Groups Projects
Commit f0553cb4 authored by william light's avatar william light Committed by GitHub
Browse files

Merge pull request #8 from mk-fg/master

Fix archives page with Jinja>=2.9
parents fa46a802 d09c8763
No related branches found
No related tags found
No related merge requests found
...@@ -8,17 +8,17 @@ ...@@ -8,17 +8,17 @@
{#- hold on to your butts! #} {#- hold on to your butts! #}
{% set month = None -%} {% set ctx = {'month': None} -%}
{%- for article in dates -%} {%- for article in dates -%}
{% set cmonth = article.date.date().replace(day=1) %} {% set cmonth = article.date.date().replace(day=1) %}
{%- if not month -%} {%- if not ctx.month -%}
{% set month = cmonth %} {% if ctx.update(month=cmonth) %}{% endif %}
<h4 class="date">{{ article.date.strftime("%b %Y") }}</h4> <h4 class="date">{{ article.date.strftime("%b %Y") }}</h4>
<div class="post archives"> <div class="post archives">
<ul> <ul>
{%- elif cmonth < month -%} {%- elif cmonth < ctx.month -%}
{% set month = cmonth %} {% if ctx.update(month=cmonth) %}{% endif %}
</ul> </ul>
<br /> <br />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment