Closed gotson closed 1 year ago
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
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.
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: https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fdocusaurus.io%2Fblog%2Frss.xml
Curious: your RSS reader doesn't support relative urls? which one is it?
i don't use a RSS reader. I consume the feed.json
in a custom application.
But we also need to handle the image urls.
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