{% extends "base_blog_section.html" %}

{% block title %}Posts tagged {{ tag|e }} | {{ M_BLOG_NAME|e }}{% endblock %}

{% block meta %}
  {% if tag.page and tag.page.description %}
  <meta name="description" content="{{ tag.page.description|dehyphenate|striptags|e }}" />
  {% endif %}
{% endblock %}

{% block social_title_url_image %}
  <meta property="og:title" content="{% if tag.page and tag.page.title %}{{ tag.page.title }}{% else %}{{ tag|e }}{% endif %}" />
  <meta name="twitter:title" content="{% if tag.page and tag.page.title %}{{ tag.page.title }}{% else %}{{ tag|e }}{% endif %}" />
  <meta property="og:url" content="{{ tag.url|format_siteurl|e }}" />
  {% if tag.page and tag.page.summary %}
  <meta property="og:description" content="{{ tag.page.summary|dehyphenate|striptags|e }}" />
  <meta name="twitter:description" content="{{ tag.page.summary|dehyphenate|striptags|e }}" />
  {% endif %}
  {% if M_SOCIAL_IMAGE %}
  <meta property="og:image" content="{{ M_SOCIAL_IMAGE|format_siteurl|e }}" />
  <meta name="twitter:image" content="{{ M_SOCIAL_IMAGE|format_siteurl|e }}" />
  {% endif %}
{% endblock %}

{% block content_title %}
      <div class="m-info m-note">
        Showing only posts tagged <em>{{ tag|e }}</em>. <a href="{{ M_BLOG_URL|format_siteurl|e }}">Show all posts.</a>
      </div>
      {% if tag.page and tag.page.content and articles_page.number == 1 %}
      <div class="m-block m-info">
        <h3>{% if tag.page.title %}{{ tag.page.title }}{% else %}{{ tag|e }}{% endif %}</h3>
        {{ tag.page.content|rtrim|indent(8) }}
      </div>
      {% endif %}
{% endblock %}
