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 @@
{#- hold on to your butts! #}
{% set month = None -%}
{% set ctx = {'month': None} -%}
{%- for article in dates -%}
{% set cmonth = article.date.date().replace(day=1) %}
{%- if not month -%}
{% set month = cmonth %}
{%- if not ctx.month -%}
{% if ctx.update(month=cmonth) %}{% endif %}
<h4 class="date">{{ article.date.strftime("%b %Y") }}</h4>
<div class="post archives">
<ul>
{%- elif cmonth < month -%}
{% set month = cmonth %}
{%- elif cmonth < ctx.month -%}
{% if ctx.update(month=cmonth) %}{% endif %}
</ul>
<br />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment