bridgetownrb/bridgetown-feed

Possible issues with collections

joemasilotti opened this issue · 2 comments

The final piece to my migration from Jekyll! I have three questions (or maybe issues) with collections.

Default output not working

The docs state "By default, collection feeds will be outputted to /feed/<COLLECTION>.xml." I find that I don't get any collection output unless I follow the step for customizing the output, adding the path: key.

Not a big deal as I'm happy to add in one key to make it work. But wanted to call it out.

If it helps, I have a collection under src/_hotwire/ with date-named files. I also specify the collection in the configuration file as output: true.

Collections sorted backwards

My src/_hotwire/ collection has files like 2022-11-24-19.md and 2022-10-27-18.md. If I add the path: /hotwire.xml option above I get a feed at hotwire.xml as expected.

But the feed only shows the first 10 articles. Sorted "backwards" to what I would expect.

If it helps, when I render these on my site I'm manually reversing them. So maybe I have some configuration set up incorrectly?

<% collections.hotwire.resources.reverse.each do |newsletter| %>

Possible to "merge" collections into posts?

Finally, is it possible to merge the resources from a collection into the default posts for a single feed.xml? This would match my existing Jekyll site and means I can remove a second link for hotwire.xml.


My working code is available on GitHub if it helps debug! And thanks in advance for the help – I'm so close to launching the new site.

@joemasilotti Hi Joe, sorry I missed seeing this a few weeks ago. I think maybe you got the "Collections sorted backwards" issue resolve by changing the sort direction in the config?

I'll review what the docs say about the default behavior, thanks for the feedback.

About the merging of collections, I'm guessing what we'd want is an additional "everything" feed which contains all the collections (or maybe they can be manually specified). If you could file a separate issue specifically for that, I'd greatly appreciate it!

Got it, thanks Jared! Feel free to close this issue if you are tracking it somewhere else. Otherwise, I'm good.