<article class="post post-id-{{ post.name }} {% if post.categories|length %}post-category-{{ post.categories[0].slug }}{% endif %} {% if single %}post-single{% endif %}">
    <h1 class="post-title text-largest">
        {% if single %}
            {{ post.title|title|safe }}
        {% else %}
            <a href="{{ url_for("minimal.post_single", slug=post.name) }}">{{ post.title|title|safe }}</a>
        {% endif %}
    </h1>

    {% if post.categories|length %}
        <div class="breadcrumb text-smaller">
            <ul>
                <li>
                    <a href="{{ url_for("minimal.post_list") }}">Home</a>
                </li>
                <li>
                    <a href="{{ url_for("minimal.post_list", category=post.categories[0].slug) }}">
                        {{ post.categories[0].name }}
                    </a>
                </li>
            </ul>
        </div>
    {% endif %}

    <div class="post-content text-medium markdown">
        {% if post.markdown %}
            {{ post.content|markdown_content|gist|code|safe|image }}
        {% else %}
            {{ post.content|gist|code|safe|image }}
        {% endif %}
    </div>

    {% if post.type == "post" %}
    <div class="post-meta text-smaller">
        Published: {{ post.date.strftime('%Y-%m-%d') }}

        {% if post.tags|length %}
        <ul class="post-meta-tags">
            <li>Tags: </li>
            {% for tag in post.tags %}
                <li>
                    <a href="{{ url_for("minimal.post_list", tag=tag.slug) }}">
                        {{ tag.name }}
                    </a>
                </li>
            {% endfor %}
        </ul>
        {% endif %}
    </div>
    {% endif %}
</article>
