{% extends "components/base.html" %}

{% block title_tag %}
{{ category.name }}
{% endblock title_tag %}

{% block meta %}
<meta property="og:title" content="{{ category.name }}">
<meta property="og:type" content="website">
<link rel="canonical" href="{{ config.SITE_URL }}/categories/{{ category.slug }}/">
{% endblock meta %}

{% block content %}
<h1 class="post-title">{{ category.name }}</h1>
<ul class="post-list">
    {% for post in posts|selectattr("category", "equalto", category) %}
    <li>
        <a href="/posts/{{ post.slug }}/">{{ post.title }}</a>
        <span class="post-date">
            <small> - <time datetime="{{ post.date }}">{{ post.date.strftime('%a, %b %d, %Y') }}</time></small>
        </span>
    </li>
    {% endfor %}
</ul>
{% endblock content %}