You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of Hugo are you using (hugo version)?
$ hugo version
Hugo Static Site Generator v0.80.0/extended windows/amd64 BuildDate: unknown
Does this issue reproduce with the latest release?
Yes
Issue
When generating RSS feeds any links in the content that use a relative (local) path to the image keep them:
With content as:
├── My New Post
│ │ ├── index.md
│ │ ├── image.png
in index.md:
...
<imgsrc="image.png">
...
This works perfectly well for actual post content on the website, but the RSS feed maintains the same img source (not using an absolute path). This breaks the RSS rendering of the content in some feed readers.
I was hoping to perhaps fix this with a regex replace in the RSS template, but re2 in go doesn't support forward/negative lookaheads to deal with this (ie: not replacing src path if it's already absolute).
Any ideas or thoughts about pushing absolute src paths for images in RSS feeds?
The text was updated successfully, but these errors were encountered:
We've had limited success with layouts/_default/_markup/render-image.html and adding a full URL there (this does get picked up by the RSS template as part of {{ .Content | html }}.
However, this doesn't seem to work for <figure> <img> ... - my guess is that using the figure shortcode skips(ish) the markdown conversion for the render-image.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
Issue
When generating RSS feeds any
links in the content that use a relative (local) path to the image keep them:
With content as:
in
index.md
:This works perfectly well for actual post content on the website, but the RSS feed maintains the same img source (not using an absolute path). This breaks the RSS rendering of the content in some feed readers.
I was hoping to perhaps fix this with a regex replace in the RSS template, but re2 in go doesn't support forward/negative lookaheads to deal with this (ie: not replacing src path if it's already absolute).
Any ideas or thoughts about pushing absolute src paths for images in RSS feeds?
The text was updated successfully, but these errors were encountered: