Skip to content

Feed's are reversed #63

@hozza

Description

@hozza

First of all, thanks for this plugin! +1

The example virtual config, it limits the posts to 10, it also seems to reserse the collection. This leads to any new posts (11 and beyond) missing from the feed.

{%- for post in collections.${collection.name} | reverse | eleventyFeedHead(${collection.limit}) %}

Is this the case for everyone, or is this due to how my collection is setup?

I've used the following virtual config setup which shows posts in the correct order when doing a "for" loop etc:

  eleventyConfig.addCollection('posts', collection =>
    collection.getFilteredByGlob('./_posts/*.md').sort((a, b) => b.date - a.date)
  )

If this is just due to my collection setup, is there a way to reverse the collection during the feed virtual config or would I have to use a manual template?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions