{# Display a list of all pages. Params: ord=asc, items=0 #}
{% macro pages(ord="asc", items=0) %}
<ul class="pages-list">
{% set page_list = site_data.pages %}
{% if ord == "desc" %}
{% set page_list = page_list | reverse %}
{% endif %}
{% if items > 0 %}
{% set page_list = page_list | slice(end=items) %}
{% endif %}
{% for page in page_list %}
<li><a href="{{ url_for(path=page.slug ~ '.html') }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
{% endmacro pages %}