Skip to content

Combining multiple collections into the main feed #390

Open
jekyll/jekyll
#9333
@iBug

Description

@iBug

Basically a re-request from #289.

Currently I'm relying on a hack onto core Jekyll to achieve this:

# _plugins/set_posts.rb
Jekyll::Hooks.register :site, :post_read do |site|
  c = site.collections
  c['posts'].docs.concat c['news'].docs
  c['posts'].docs.concat c['planet'].docs
end

This way my feed.xml contains posts from all three collections. However as of Jekyll 4.3, jekyll doctor complains about multiple source files pointing to the same output file. It's absolutely right that I basically just duplicated all posts from desired collections into the _posts collection.

Now I can't find another good way to work around this, so I have to bring #289 up again. It's useful and hopefully easy to implement.

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