chore: slice entries before processing to reduce filter runs

This commit is contained in:
Cory Dransfeldt 2024-08-05 15:13:56 -07:00
parent 10dd21f6e3
commit cf647eed90
No known key found for this signature in database
4 changed files with 8 additions and 7 deletions

View file

@ -2,7 +2,7 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="{{ permalink | absoluteUrl: globals.url }}" rel="self" type="application/rss+xml" />
{%- assign entries = data | normalizeEntries -%}
{%- assign entries = data | normalizeEntries: 20 -%}
<title>{{ title }}</title>
<description>{{ description }}</description>
<link>{{ permalink | absoluteUrl: globals.url }}</link>
@ -14,7 +14,7 @@
<width>144</width>
<height>144</height>
</image>
{% for entry in entries limit: 20 -%}
{% for entry in entries -%}
{%- assign rating = entry.rating -%}
{%- capture entryTitle -%}
{{ entry.title | escape }}