<div class="blog container">
{% paginate blog.articles by 8 %}

    <h1>{{ blog.title }}</h1>

    <div class="blog-articles">
    {% for article in blog.articles %}
        <div class="blog-article">
            {% render 'image', image: article.image %}

            <a href="{{ article.url }}" class="no-link-style">
                <h2>{{ article.title }}</h2>
                <span class="article-date-and-author">
                    {%- assign date_format = 'general.article.article_published_date_format_day_month_year' | t -%}
                    {% if article.author %}{{ article.author }}{% endif %}, {{ article.published_at | date: date_format }}
                </span>
                <span>
                    {% assign words = article.content | strip_html | strip_newlines | split: ' ' | size %}

                    {% if words < 360 %}
                        {{ 'general.article.one_minute' | t }}
                    {% else %}
                        {{ words | divided_by: 180 }}{{ 'general.article.more_minutes' | t }}
                    {% endif %}
                </span>

                <p>{{ article.content | strip_html | truncatewords: 100 }}</p>
            </a>
        </div>
    {% endfor %}
    </div>

    {% if paginate.pages > 1 %}
        {{ paginate | default_pagination }}
    {% endif %}

{% endpaginate %}
</div>

{% schema %}
{
    "name": "t:sections.section-blog.name"
}
{% endschema %}