-
Notifications
You must be signed in to change notification settings - Fork 10.3k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
RSS/Atom Feeds should use absolute URLs to be standards-compliant #14133
Comments
Hi! Thanks a lot for filing this issue! I wonder if you would like to make a PR to Thank you! 💜 |
@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. |
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! 💪💜 |
Ran into this one today. @agentofuser how did you get on with the PR? |
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? |
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: |
So readers _should_ (do?) always resolve relative urls, but just in case... See: - https://validator.w3.org/feed/docs/warning/ContainsRelRef.html - https://validator.w3.org/feed/docs/atom.html - https://discourse.gohugo.io/t/absolute-urls-in-rss-feeds/25971 - gatsbyjs/gatsby#14133 - https://markshust.com/2020/06/25/fixing-images-in-gatsby-rss-feeds/
Hello @LekoArts , |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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"
The text was updated successfully, but these errors were encountered: