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
Atom feeds use relative path for src attribute value in img tags. #812
Comments
Hey Charles. Saw the discussion in IRC that prompted this. Have you defined For your relative source paths, have you tried I have a feeling that some combination of the above will address this problem. If it doesn't, try the new syntax for linking to internal content.
I believe the contributor's thought was the latter would include all translations, while the former would only include items written in the default language. |
Setting The new Also thinking about it, it would be better if |
Could you test and see whether the behavior you describe above is still present in current master? I seem to recall that the Edit: The latter is due to be addressed as part of #795. |
Just checked out |
I just hit this too. As a result, my first post mentioning Pelican showed up on an aggregator with the broken image link. A little embarrassing for Pelican, I think :-). I'll re-generate whenever an update is available, though. |
Probably best to use absolute URL links until a relevant enhancement has landed. |
Absolute URL links makes it impossible to draft posts locally, though. |
Quite true. If someone would like to step forward and modify the behavior such that relative URLs are converted into absolute URLs only for feeds, I imagine that would solve this problem. |
Well, to be clear, I have explicitly set |
The As I said above, I agree that the user shouldn't need to type an absolute URL — as long as |
Is there any reason that this should be specific to just feeds? If I specify |
Sorry for taking so long to respond, @glyph. Yours is a reasonable assumption. Some folks have expressed a desire for root-relative URLs for intrasite links (in production as well as development). In an ideal world, it might be nice if |
No problem, open source, volunteer effort and all that :-). Perhaps I'll have to make the time to dive into Pelican myself… To be clear though it doesn't sound like there's any opposition to implementing this now, though. |
No opposition. It would be quite welcome, actually. As would be your diving into Pelican, by the way! (^_^) |
I am also facing this problem... I wonder if there is any quick workaround before someone actually fix it? |
@glyph did this ever get done? |
@leotrs - which, regenerating my site's feeds? yes, I do so pretty regularly… |
@justinmayer did @andyli's PR fix this? |
I would like to revisit this issue and hopefully put it to bed. First, it seems to me that the most expedient solution is to use the But that doesn't address what @kickingvegas said about this kind of solution:
Another approach could be to look for relative
This is obviously a simplistic implementation and would need to be improved. For example, if someone writes an article about relative URLs and includes some in a code snippet, well... those relative URLs will also be summarily replaced. Also, I have no idea whether there would be performance implications. What do you think about this? Please post your thoughts here so we can wrap this one up. (cc: @getpelican/reviewers) |
After some discussion about this topic, the consensus is that the aforementioned approach would likely be unacceptably brittle. There is already link syntax that produces proper absolute links in feeds, and it shouldn't be too difficult to script mass-replacement of |
Problem
Page content that use relative paths for the
src
attribute inimg
tags are unchanged when rendered into an Atom feed. Thesrc
value should be replaced with an absolute path. This behavior probably also is seen with RSS feeds (haven't tested).Fix Request
Ideally the absolute path would be defaulted to be prefixed with
SITEURL
and can be overridden with another variable (e.g. a path pointing to CDN).Perhaps
FEED_ASSET_URL
?The text was updated successfully, but these errors were encountered: