Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for user-configurable feed templates. #294

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fancypantalons
Copy link

@fancypantalons fancypantalons commented Dec 3, 2019

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.

Brett Kosinski added 2 commits December 2, 2019 17:37
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.
This change enables multiple main feeds with different layouts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant