1
0
em.0x45.cz/templates/macros.html

17 lines
432 B
HTML
Raw Normal View History

2021-12-02 11:53:48 +01:00
{% macro posts_latest(section, count) %}
{% set section = get_section(path=section~"/_index.md") %}
{% for page in section.pages %}
{% if loop.index > count %}
{% break %}
{% endif %}
{{ macros::print_article(page=page) }}
{% endfor %}
{% endmacro %}
{% macro print_article(page) %}
<article>
<h1><a href="{{ page.permalink }}">{{ page.title }}</a></h1>
<p>{{ page.summary | safe }}</p>
</article>
{% endmacro %}