{% macro list_posts(section=false, count=0, taxonomy=false) %} {% if taxonomy == false and section != false %} {% set section = get_section(path=section~"/_index.md") %} {% endif %} {% for page in section.pages %} {% if loop.index > count and count != 0 %} {% break %} {% endif %} {{ self::print_article(page=page) }} {% endfor %} {% endmacro %} {% macro print_article(page) %}

{{ page.title }}

{{ page.summary | safe }}

{{ self::page_info(page=page) }}
{% endmacro %} {% macro page_info(page) %} {% if page.date %}
{{ page.date }} {%- if page.extra.author -%} , {{ page.extra.author }} {% endif %} {% if page.taxonomies.categories %}
{{ self::list_taxonomy(kind="categories", page=page.taxonomies.categories, prepend="#") }}
{% endif %}
{% endif %} {% endmacro %} {% macro page_updates(page) %} {% if page.extra.updates %}
Page updates:
{% endif %} {% endmacro %} {% macro toc() %} {% if page.toc and not page.extra.notoc %} {% endif %} {% endmacro %} {% macro list_taxonomy(kind, page=false, prepend="") %} {# Option `kind` must always be set and specifies the wanted taxonomy. If `page` is set, this macro only prints items specific for this page. Otherwise it prints all items. It expects `page.taxonomies.`. Option `prepend` can be used to prepend any string to the item name. #} {% endmacro %}