{# `metadata` can be "dates", "indexes" or both (e.g. "dates indexes" or "indexes dates"). #} {# If both, the order doesn't matter and indexes will always be displayed before dates. #} {# It would also work with arrays (e.g. ["dates"] or ["indexes"] or even ["indexes","dates"]). #} {# Nevertheless, arrays cannot be used as a default value for a macro parameter in Tera (see https://github.com/Keats/tera/issues/710). #} {# `paginator` is only used to compute indexes metadata and can be let empty otherwise. #} {% macro list_posts(posts, max, metadata="dates", language_strings="", section_path="blog", paginator="") %} {%- set separator = config.extra.separator | default(value="•") -%}
{{ post.description }}
{% elif post.summary %}{{ post.summary | striptags | trim_end_matches(pat=".") | safe }}…
{% endif %}