{# Display a list of all content series with post counts. Params: ord=desc, items=0 #}
{% macro series(ord="desc", items=0) %}
{% set series_map = group(kind="series", ord=ord, items=items) %}
<ul class="series-list">
{% for series_name, posts in series_map %}
{% set series_slug = series_name | slugify %}
<li><a href="{{ url_for(path='series-' ~ series_slug ~ '.html') }}">{{ series_name }}</a> ({{ posts | length }} posts)</li>
{% endfor %}
</ul>
{% endmacro series %}