diff --git a/_layouts/recent_feed.njk b/_layouts/recent_feed.njk index d824f02..4fa003f 100644 --- a/_layouts/recent_feed.njk +++ b/_layouts/recent_feed.njk @@ -13,8 +13,13 @@ {% endif %}
+ {% if paginated %} + {% set cycling = paginated | i18n_filter %} + {% else %} + {% set cycling = collections[cycling_tag] | i18n_filter %} + {% endif %} {% set current_year = 0 %} - {% for post in collections[cycling_tag] | i18n_filter %} + {% for post in cycling %} {% set post_year = post.date | date("yyyy") %} {% if post_year != current_year %}

{{ post_year }}

@@ -37,6 +42,7 @@

{{ "read-more" | i18n }}

{% endfor %} + {# TODO: handle pagination buttons #}
diff --git a/en/blog/index.md b/en/blog/index.md index 3a35201..3b0c4dd 100644 --- a/en/blog/index.md +++ b/en/blog/index.md @@ -3,6 +3,10 @@ title: blog layout: recent_feed cycling_tag: posts sidebar: blog +pagination: + data: collections.posts + size: 6 + alias: paginated flight: img: /img/gifcities/mimi.gif url: / diff --git a/es/blog/index.md b/es/blog/index.md index d110ca4..24715ff 100644 --- a/es/blog/index.md +++ b/es/blog/index.md @@ -3,9 +3,13 @@ title: blog layout: recent_feed cycling_tag: posts sidebar: blog +pagination: + data: collections.posts + size: 6 + alias: paginated flight: - img: /img/gifcities/mimi.gif - url: / + img: /img/gifcities/mimi.gif + url: / --- # blog