itsonus-blog/_includes/postslist.njk

21 lines
895 B
Plaintext

{% for post in postslist | reverse %}
<article class="postlist-item">
<header class="postlist-header">
<h2>
<a href="{{ post.url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>
</h2>
<ul class="post-metadata">
<li><time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></li>
{%- for tag in post.data.tags | filterTagList %}
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li><a href="{{ tagUrl }}" class="post-tag">#{{ tag }}</a>{%- if not loop.last %} {% endif %}</li>
{%- endfor %}
</ul>
</header>
<p>{{ post.data.description }}</p>
<footer class="postlist-footer">
<a href="{{ post.url }}">Lire la suite</a>
</footer>
</article>
{% endfor %}