{% macro list_articles(articles, included_categories, excluded_categories=(), title=None, display_category=True, limit=None, see_more=None) -%}
<ul class="articles_list">
    {% if title is defined %}<li><span class="metadata date"><h2>{{ title }}</h2></span></li>{% endif %}
    
    {% for article in articles | rejectattr("category", "in", excluded_categories) | selectattr("category", "in", included_categories) | batch(limit) | first %}
        {% if not article.unlisted or article.category == category %}
        <li>
            <span class="metadata date">{{ article.date.strftime("%B %Y") }}</span>
            <a class="post_title" href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>&nbsp;
            {% if display_category %}<span class="metadata category">{{ article.category }}</span>{% endif %}
        </li>
        {% endif %}
    {% endfor %}
    {% if see_more %}<li><span class="metadata date">…</span><a class="post_title" href="{{ see_more }}">plus d'articles </a>&nbsp;</li>{% endif %}
</ul>
{%- endmacro %}

{% macro list_tag(articles, title, limit=None) -%}
<ul class="articles_list">
    {% if title is defined %}<li><span class="metadata date"><h2>{{ title }}</h2></span></li>{% endif %}
    
    {% for article in articles | batch(limit) | first %}
        <li>
            <span class="metadata date">{{ article.date.strftime("%B %Y") }}</span>
            <a class="post_title" href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>&nbsp;
            <span class="metadata category">{{ article.category }}</span>
        </li>
    {% endfor %}
</ul>
{%- endmacro %}