-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Feed-related code is mixed into articles and settings code #2695
Comments
What would be the benefit of that? Currently, feeds are for articles and their generation is part of article related output process. So it feels natural to have them in PS: I would be very opposed to moving that warning out of |
@avaris, I may have misunderstood the point of My goal is to improve and isolate the XML feed writer and to introduce a JSON feed writer for my site. However, Pelican explicitly discards all but the first Writer it finds (I'm looking at It looks like I can separate the HTML and XML feed writers into separate Writer objects and then rely solely on signals for both of those and for a future JSON feed writer plugin. Are there better ways to add additional writers in this situation? I can write a plugin to accomplish all of this but it will require monkey-patching Pelican's internals instead of building on its built-in functionality. That's why I'm currently thinking that I could improve how Pelican's own writers interact with generators, to pave the way for smoother plugin development in this area. |
Link to JSON-feed-related issue on FeedGenerator repository: getpelican/feedgenerator#11 |
Yes, current design requires that there can only be one writer and base writer delegates a lot of the feed related tasks to |
@kurtmckee: Any follow-up thoughts regarding this issue? |
Hi Kurt. As @avaris suggested, if you would like to extend FeedGenerator to support JSON and then submit a PR to Pelican that uses that support, your contributions would be most welcome. Hopefully that answers your original question. I look forward to seeing what you come up with! ✨ |
Good suggestions, Justin!
No, that doesn't answer my original question. My stated goal is JSON feeds but I can accomplish that any ol' which way. I'm wanting to implement it the "right" way and that led me to feeling that something isn't quite right with the current generators/writers pattern. That's the root issue in this bug report, but that feeling of hasn't been resolved through this discussion.
However, time has prevented me from doing a deep dive into the Pelican internals, so this is probably just a case of me not understanding something.
Thank you both for your time and responses, I really appreciate it!
…On April 30, 2020 5:21:04 AM UTC, Justin Mayer ***@***.***> wrote:
Hi Kurt. As @avaris suggested, if you would like to extend FeedGenerator to support JSON and then submit a PR to Pelican that uses that support, your contributions would be most welcome. Hopefully that answers your original question. I look forward to seeing what you come up with! ✨ >
-- >
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#2695 (comment)
|
I'm reviewing Pelican's feed-related code and I've found that it is mixed into
ArticlesGenerator.generate_feeds()
(ingenerators.py
) andconfigure_settings()
(insettings.py
, which generates a warning ifSITEURL
isn't set)I'm interested in isolating the feed-related code into its own generator and contributing the changes back to the project but I'd like to confirm whether this work would be considered for inclusion.
Please let me know. Thanks!
The text was updated successfully, but these errors were encountered: