<article>

{% if article.title %}
<h1 class="article_title{% if article.link %} linkpost_title{% endif %}">
  <a href="{% if article.link %}{{ article.link }}{% else %}/{{ article.url }}{% endif %}">{{ article.title|safe }}</a>
</h1>
{% endif %}

{% if article.type == 'post' %}
<div class="article_meta">
  <ul class="dot_list">
    <li class="article_date">Posted on {{ article.date|locale_date }}</li>
    {% if article.tags|length > 0 %}
    <li class="article_tags">Tagged with

      {#
        Fill in a comma-separated list of tags, ensuring that the last
        tag isn't followed by a comma.
      #}
      {% for tag in article.tags|sort %}
        <a href="/tag/{{ tag }}/" class="tag_{{ tag }}">{{ tag }}</a>{% if loop.index != article.tags|count %}, {% endif %}
      {% endfor %}</li>
    {% endif %}
    {% if article.link %}
    <li class="article_permalink"><a href="/{{ article.url }}">&infin;</a></li>
    {% endif %}
  </ul>
</div>
{% endif %}

{% if is_index and '<!-- summary -->' in article.content %}
  {{ article.content.split('<!-- summary -->')[0]|safe }}
  <p><a href="/{{ article.url }}" class="continue_reading">Continue reading</a></p>
{% else %}
  {{ article.content|safe }}
{% endif %}

</article>
