RSS/Atom Feeds should use absolute URLs to be standards-compliant #32743
Replies: 7 comments
-
Hi! Thanks a lot for filing this issue! I wonder if you would like to make a PR to Thank you! 💜 |
Beta Was this translation helpful? Give feedback.
-
@freiksenet you're welcome :) I'd love to help, yes. I will probably have time to write that PR in a week or two if waiting that long is ok. |
Beta Was this translation helpful? Give feedback.
-
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
Beta Was this translation helpful? Give feedback.
-
Ran into this one today. @agentofuser how did you get on with the PR? |
Beta Was this translation helpful? Give feedback.
-
I'd be happy to take a crack at it, but I don't understand the code well enough. Can anyone lend a bit of insight to help get me started? |
Beta Was this translation helpful? Give feedback.
-
Found a great blog article that describes how to replace the relative URL with absolute URL in the RSS feed while this issue gets sorted out: |
Beta Was this translation helpful? Give feedback.
-
My fix for this issue adapted from Mark Shust's method. |
Beta Was this translation helpful? Give feedback.
-
Description
gatsby-plugin-feed
uses themarkdownRemark
node's html field as the contents of RSS entries.gatsby-plugin-feed
README also uses the html field unaltered.I found a ("hacky", as he himself describes it) workaround on Dan Abramov's blog:
gaearon/overreacted.io#65
The workaround is based on string replacement though, which would replace false-positives such as matches within code blocks. I'm also not sure whether
href
andsrc
cover every use of urls in the html spec.Steps to reproduce
salty_egg
Expected result
href="https://gatsby-starter-blog-demo.netlify.com/static/8058f3f26913fea3b6a89a73344fe94a/2b40c/salty_egg.jpg"
src="https://gatsby-starter-blog-demo.netlify.com/static/8058f3f26913fea3b6a89a73344fe94a/c739e/salty_egg.jpg"
Actual result
href="/static/8058f3f26913fea3b6a89a73344fe94a/2b40c/salty_egg.jpg"
src="/static/8058f3f26913fea3b6a89a73344fe94a/c739e/salty_egg.jpg"
Beta Was this translation helpful? Give feedback.
All reactions