I currently want to include a fulltext-RSS-feed to my page, and I am currently at an issue where I’m unsure what’s the most elegant solution.
The Problem
I have taken the hugo RSS-template, added a field <content type="html">{{ .Content | html }}</content>
to it. However, this field now contains relative URLs to all images and other files linked, that are placed it the appropriate folder next to the markdown, and at least my Feed-Reader is not able to resolve this, so the posts show up without the figures included.
What I tried so far
-
{{ .Content | absURL | html }}
, doesn’t change anything - {{ .Content | html | absURL }}
, doesn't render at all as
html` seems to have to be the last part of the chain - both of the above with
safeHTML
instead of HTML -
canonifyURLs = true
,relativeURLs = true
and both at the same time
What I currently still try to avoid
- always writing my own shortcode:
![my image]({{< absolutify "myimage.png" >}})
, as it would most likely work, but would be comparatively inconvenient compared to the builtin ` to always write a shortcode for it.
So I was wondering whether there possibly is an elegant option to tell Hugo to just absolutify all URLs, be it images or links to other material, that I haven’t found yet? Preferrably one that doesn’t require modifications of existing markdown, so that I can just continue writing in normal markdown.
Any ideas are greatly appreciated!