Compare commits

...

2 Commits

Author SHA1 Message Date
Helen Chong cf82976e9c Limit RSS feed items to 15 2024-09-14 22:30:29 +08:00
Helen Chong e1bfb45496 Tweak sitemap whitespace 2024-09-14 21:47:25 +08:00
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -4,7 +4,7 @@ eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for item in collections.all -%}
{%- for item in collections.all %}
<url>
<loc>{{ sitemeta.siteUrl + item.url | url }}</loc>
<lastmod>{% if item.updated %}{{ item.updated.toISOString() }}{% else %}{{ item.date.toISOString() }}{% endif %}</lastmod>