More universal macro for listing posts

This commit is contained in:
em committed 2021-12-04 18:20:01 +01:00
1 parent e20c485d03
commit 194fcc5b92
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
{% macro posts_latest(section, count) %}
{% macro list_posts(section, count=0) %}
{% set section = get_section(path=section~"/_index.md") %}
{% for page in section.pages %}
{% if loop.index > count %}
{% if loop.index > count and count != 0 %}
{% break %}
{% endif %}
{{ macros::print_article(page=page) }}