{% extends "_base.html" %}

{% block page %}tag-single{% endblock page %}
{% block lang -%}
{% set blog_section_path = config.extra.blog_section_path | trim_start_matches(pat="/") %}
{% set section_md_path = blog_section_path ~ "/_index.md"%}
{% set section = get_section(path=section_md_path, metadata_only=true) %}
{%- if section.extra.lang %}{{ section.extra.lang }}{% else %}{{ lang }}{% endif -%}
{%- endblock lang %}
{% block title %}{{section.title}}{% endblock title %}

{% block content %}
{% include "_header.html" %}
<div id="wrapper">
  <main>
    <div class="title">
      <span># {{ term.name }}</span>
      <a href="{{ config.base_url ~ '/tags' }}">All Tags</a>
    </div>
    <div class="post-list">
      {% for post in term.pages %}
      <a class="post" href="{{ post.permalink }}">
        <span>{{ post.title }}</span>
        <span class="date">{{ post.date | date }}</span>
      </a>
      {% endfor %}
    </div>
  </main>
  {% include "_footer.html" %}
</div>
{% endblock content %}