-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Blog Atom/RSS feed urls should be absolute instead of relative #9136
Comments
can some one assign me this issue, would love to work on it |
@ranjanmangla1 We don't assign to external contributors. You can simply send a PR. For some hint: we already have a parsed HTML tree representing the feed item (because we extracted it from the blog's build output). You just need to walk that HTML tree and resolve all URLs with the site's URL. |
ok, thank you for the reply and the hint, will send a pr by this evening |
Are we sure this is really needed? What is the problem with using relative URLs? Feed readers like Feedly are able to handle that properly and handle that resolution against the feed item URL. Also if we implemt this, why would we do this only to the links, and not the images and other URL references? Please explain exactly how using relative URLs have been a problem for you in practice, or share a link to a reference site that say it's bad to use relative URLs Edit: found a ref recommending absolute URLs: https://validator.w3.org/feed/docs/warning/ContainsRelRef.html Relative urls are probably supported by most RSS readers but maybe not all, so ok to implement this 👍 But we also need to handle the image urls. Curious: your RSS reader doesn't support relative urls? which one is it? We have a few RSS errors reported here: |
i don't use a RSS reader. I consume the
agreed, i wanted to update this issue but you've been faster than me :-) |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
If a blog post contains internal links, when the blog post is made available via feeds (rss/atom/json), the links should be made absolute, instead of relative.
Here is an example of Json feed from my site:
And a problematic href:
<a href=\"/docs/installation/configuration#server_port--serverport-port\">
The generated feed should instead be generating an absolute link, ie https://komga.org/docs/installation/configuration#server_port--serverport-port
Reproducible demo
No response
Steps to reproduce
Expected behavior
Absolute links in href
Actual behavior
Relative links in href
Your environment
Self-service
The text was updated successfully, but these errors were encountered: