Microflash/gridsome-plugin-feed

Support images

freaktechnik opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
Posts will often come with a cover image. The rss feed transformer used here documents support for an image property per post. However images that are referenced in the post markdown files and that are g-image ready in the graphQL API are just absolute local file paths during nodeToFeedItem. As such, they can't be used as an image in the feed.

Describe the solution you'd like
I'd expect to get the same or similar data as I would get in graphQL, so an object with the resulting src and mimeType and dimensions.

Describe alternatives you've considered
An alternative would be to instead make gridsome generate the xml/json for feeds, since that could use the gql, but that sounds like a lot of work to strip everything down to generate a pure file.

@freaktechnik Just to be very clear, this plugin does not enforce any opinions on the content of the feed or feed items. As long as you provide appropriate content through the options, it'll try to generate an RSS, Atom or JSON feed.

Getting transformed content (e.g., the one GraphQL layer provides) has been asked many times on the Gridsome repo but as of now, no official API exists. That's why people resort to using external parsers (like marked) to generate HTML and then feed it to nodeToFeedItem.

I have no plans to add any such opinions in the plugin, mainly because that's not the goal of the plugin in the first place. However, if Gridsome exposes an API to access transformed content in future, I'll definitely add an example on how that'd work with the plugin.