Limit RSS feed items to 20

This commit is contained in:
Helen Chong 2024-06-08 17:50:18 +08:00
parent 2299b21086
commit 53192670cb
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ eleventyExcludeFromCollections: true
<name>{{ sitemeta.siteAuthor.name }}</name> <name>{{ sitemeta.siteAuthor.name }}</name>
<email>{{ sitemeta.siteAuthor.email }}</email> <email>{{ sitemeta.siteAuthor.email }}</email>
</author> </author>
{%- for item in collections["feed items"] | reverse %} {%- for item in collections["feed items"] | reverse | itemLimit(20) %}
{% set absolutePostUrl %}{{ item.url | url | absoluteUrl(sitemeta.siteUrl) }}{% endset %} {% set absolutePostUrl %}{{ item.url | url | absoluteUrl(sitemeta.siteUrl) }}{% endset %}
<entry> <entry>
<title>{{ item.data.title }}</title> <title>{{ item.data.title }}</title>