Update archives to display the date once all articles on the date.
The old method printed the date for every article even if they had the same publish date. This update prints the date once for all articles published on that date.
This commit is contained in:
parent
17e24acc70
commit
a44fba59a2
1 changed files with 4 additions and 0 deletions
|
@ -8,8 +8,12 @@
|
||||||
</header>
|
</header>
|
||||||
<div>
|
<div>
|
||||||
<dl>
|
<dl>
|
||||||
|
{% set previous_date = False %}
|
||||||
{% for article in dates %}
|
{% for article in dates %}
|
||||||
|
{% if article.locale_date != previous_date: %}
|
||||||
|
{% set previous_date = article.locale_date %}
|
||||||
<dt>{{ article.locale_date }}</dt>
|
<dt>{{ article.locale_date }}</dt>
|
||||||
|
{% endif %}
|
||||||
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
|
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dl>
|
</dl>
|
||||||
|
|
Loading…
Reference in a new issue