jekyll-feed icon indicating copy to clipboard operation
jekyll-feed copied to clipboard

Support for user-configurable feed templates.

Open fancypantalons opened this issue 6 years ago • 0 comments

This commit adds a new configuration setting that allows the user to specify their own feed template, either for all feeds, or for categories or collections, as follows:

feed:
  ...
  templates:
    -
      path: feed-foo.xml
      collection: bar
      category: baz
    -
      path: feed-xyz.xml
      collection: bar
    -
      path: feed-qwe.xml
      category: baz
    -
      path: feed.xml

For a given feed, the first matching template is the one that's used.


My use case for this one is integration with micro.blog while wanting to continue to support my regular RSS feed for normal subscribers. I've created a separate RSS feed containing only my notes (putting them all in the same category), and I want to exclude the entry title from each element in the feed so micro.blog treats them as notes instead of articles.

However, I still want a normal full feed with everything else in it.

This change allows me to alter the feed structure for the notes only.

I noticed there's a number of other requests to be able to specify alternative titles by category and so forth, and those requests could all be covered by this same change.

In addition, I noticed another PR that requested being able to generate multiple of the same feed with different layouts. I could see altering this changeset to enable that kind of use case through some alterations to the config structure if that's useful.

fancypantalons avatar Dec 03 '19 00:12 fancypantalons