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

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

Open
jgonyea opened this issue Mar 19, 2022 · 2 comments
Open

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

jgonyea opened this issue Mar 19, 2022 · 2 comments

Comments

@jgonyea
Copy link
Contributor

jgonyea commented Mar 19, 2022

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
Copy link
Contributor Author

jgonyea commented Mar 20, 2022

PR submitted:
#67

@aleclerc7
Copy link

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

  • If a theme or plugin wants to create a custom template_name.(rss|atom).twig file, it does not work. This is always the feed plugin that has the upper hand.

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.

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

No branches or pull requests

2 participants