diff --git a/layouts/feed.njk b/layouts/feed.njk index a5dc737..3d44004 100644 --- a/layouts/feed.njk +++ b/layouts/feed.njk @@ -5,29 +5,31 @@ {{ collections[collection] | getNewestCollectionItemDate | dateToRfc3339 }} {{ options.url }}/ - {%- for item in (collections[collection] | sort(true, false, "date") | slice(size)) %} - {%- set absolutePostUrl = item.url | canonicalUrl %} - - {{ item.data.title }} - - {{ item.date | dateToRfc3339 }} - {{ absolutePostUrl }} - {% if item.data.authors %} - {% for author in item.data.authors %} + {%- for item in (collections[collection] | sort(true, false, "date") %} + {%- if loop.index0 < size %} + {%- set absolutePostUrl = item.url | canonicalUrl %} + + {{ item.data.title }} + + {{ item.date | dateToRfc3339 }} + {{ absolutePostUrl }} + {% if item.data.authors %} + {% for author in item.data.authors %} + + {{ author.name }} + {% if author.url %}{{ author.url }}{% endif %} + + {% endfor %} + {% elif item.data.author %} - {{ author.name }} - {% if author.url %}{{ author.url }}{% endif %} + {{ item.data.author.name }} + {% if item.data.author.url %}{{ item.data.author.url }}{% endif %} - {% endfor %} - {% elif item.data.author %} - - {{ item.data.author.name }} - {% if item.data.author.url %}{{ item.data.author.url }}{% endif %} - - {% endif %} - - - - + {% endif %} + + + + + {%- endif %} {%- endfor %}