{% extends "base.html" %}

{% block main %}
  <main id="content">
    {%- if taxonomy.term %}
      <h3 style="margin-bottom:0">Filtering for "{{ section.title }}"</h3>
      <small>
        <a href="{{ get_url(path="@/blog/_index.md") }}">Remove filter</a>
      </small>
    {%- endif %}
    <ul class="blog-posts">
      {% for page in section.pages %}
        <li>
          <span>
            <time datetime='{{ page.date | date(format='%+') }}' pubdate>
              {{ page.date | date(format=config.extra.date_format) }}
            </time>
          </span>
          <a href="{{ page.permalink }}">{{ page.title }}</a>
        </li>
        {% else %}
        <li>
          No posts yet
        </li>
      {% endfor %}
    </ul>
    <small>
      <div>
        {% set tags = get_taxonomy(kind="tags") %}
        {% for post in tags.items %}
          <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp;
        {% endfor %}
      </div>
    </small>
  </main>
{% endblock %}