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

Gatsby Feed Plugin and Feed Example Issues #1808

Closed
ghost opened this issue Aug 14, 2017 · 10 comments
Closed

Gatsby Feed Plugin and Feed Example Issues #1808

ghost opened this issue Aug 14, 2017 · 10 comments

Comments

@ghost
Copy link

ghost commented Aug 14, 2017

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.

@KyleAMathews
Copy link
Contributor

/cc @nicholaswyoung

@secretfader
Copy link

secretfader commented Aug 15, 2017

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.

@secretfader
Copy link

secretfader commented Jan 4, 2018

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?

@mikefowler
Copy link

@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?

@secretfader
Copy link

@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.

@sebastienbarre
Copy link

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.

  • Chrome says:
No webpage was found for the web address: http://localhost:8000/rss.xml
  • Firefox:
XML Parsing Error: no root element found
Location: http://localhost:8000/rss.xml
Line Number 1, Column 1:

@secretfader
Copy link

@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.

@sebastienbarre
Copy link

@nicholaswyoung thanks for the quick reply. It works indeed when running build. Appreciated.

@secretfader
Copy link

secretfader commented Jan 11, 2018

@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.

@calcsam
Copy link
Contributor

calcsam commented Jan 14, 2018

@nicholaswyoung agreed, let's close this.

@calcsam calcsam closed this as completed Jan 14, 2018
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

5 participants