The plugin doesn't seem to display the right <link> from the siteUrl. And still shows <link>http://github.com/dylang/node-rss</link>
I think this is because RSS npm looks for that data as site_url (https://www.npmjs.com/package/rss), which this used to be by default in the siteMetadata. However, changing or adding this to the gatsby-config doesn't seem to help either.
Same with the generator field. It looks like in the plugin you try to change it to Gatsby and there seems to be an easy way to override it, but yours doesn't change the parameter nor does setting it in the plugin options.
It would also be nice if it was easy to use the other parameters from the RSS npm. Specifically for changing site details (not just feed items).
Related: Gatsby feed example (/examples/feed) doesn't build when running gatsby develop. Here's the error:
Error: Module build failed: Error: Cannot find module 'babel-preset-env' (While processing preset: ".babelrc.js")
Probably the result of recent changes to code concerning babel.
/cc @nicholaswyoung
After looking at this clear-eyed (I saw it come into my inbox last night, but lacked the clarity to properly review), my initial hunch is the Babel issue was probably introduced here. (@roundedbygravity Try running npm install from the repo root instead of the examples/gatsby-plugin-feed folder, and see if that helps clean up the Babel dependency error.)
As for the examples, I know they haven't kept up with recent changes. I'm going to clean up the feed plugin, but really what I'd eventually like is a syndication plugin with better documentation that allows it to easily generate a number of syndication outputs including RSS and JSON Feed. It's almost done and ready for release, but I'd like to test it out on myself first.
Since I never got a reproducable case for this issue (and since the <link> tag works fine on my site), I suggest we close this unless someone objects. @roundedbygravity's initial issue is probably a configuration error, and I'm working to make those much easier to avoid.
@KyleAMathews can you close this, or allow me to?
@nicholaswyoung I think the only outstanding concern expressed by @roundedbygravity is that, as documented, setting "generator" does not work. As an interim measure, maybe I can update my PR to simply improve the documentation regarding how to pass extra feed options in the siteMetadata query?
@mikefowler @roundedbygravity I meant to mention this in the original comment, but if you return a object with the key generator from your setup function, then you can set any parameter (including generator) that you'd like.
I just tried it on the feed I linked above, and it worked.
Just adding my 2 cents, as I'm not sure if the above means the plugin has been fixed, but examples/feed does not appear to function.
No webpage was found for the web address: http://localhost:8000/rss.xml
XML Parsing Error: no root element found
Location: http://localhost:8000/rss.xml
Line Number 1, Column 1:
@sebastienbarre I think the feed example is being revamped as part of #3413. Though, at last check, the feed plugin example worked fine. You have to run build though because the develop stage doesn't seem to generate the plugin's static files.
@nicholaswyoung thanks for the quick reply. It works indeed when running build. Appreciated.
@sebastienbarre Excellent! And now that you bring it up, I've been frustrated by this before and should probably put a note in the README.
@nicholaswyoung agreed, let's close this.