getgrav / grav-plugin-feed

Grav Feed Plugin
https://getgrav.org
MIT License
16 stars 11 forks source link

Feture Request: Allow overriding of default feed.TYPE.twig #66

Open jgonyea opened 2 years ago

jgonyea commented 2 years ago

Currently, there appears no way of overriding the feed plugin's feed.(rss|atom|json).twig feeds, due to how the feed plugin processes it's onPageInitialized function.

Could the plugin allow an override, either maybe from a header k:v config setting or maybe based upon the current page template?

I'd be happy to submit a PR

jgonyea commented 2 years ago

PR submitted: https://github.com/getgrav/grav-plugin-feed/pull/67

aleclerc7 commented 2 years ago

I agree that the “catch-all” approach of the feed plugin is problematic.

The PR #67 is a way to circumvent this behaviour (thank you @jgonyea).

I think a better solution would be for the plugin itself to check if there is already a template Grav calculated. But is this possible at all? Grav already has all the good mechanics. It is just that the feed plugin is doing too much. It should kick in only if there are no existing matching templates. If there is one, the default mechanism of Grav should be allowed to work.

Kind regards.