blog/lib/layouts/index.njk

23 lines
538 B
Plaintext
Raw Normal View History

2023-08-15 23:02:17 +02:00
{% extends "default.njk" %}
{% block main %}
<p>
{{ contents | safe }}
</p>
{% for date, posts in collections.posts | groupby('pub.year') | dictsort | reverse %}
<h2 class="{{classes.h2}}">{{ date }}</h2>
<hr class="{{ classes.hr }}"/>
{% for post in posts %}
<div>
<h4 class="{{ classes.h4 }}"><a href="{{ post.permalink }}">{{ post.title | safe }}</a></h4>
<h5>{{ post.description | safe }}</h5>
</div>
{% else %}
No posts
{% endfor %}
{% endfor %}
{% endblock %}