More universal macro for listing posts
This commit is contained in:
@ -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) }}
|
||||
|
Reference in New Issue
Block a user