# Absolutify all URLs in a content for full-text RSS-feed?

**URL:** https://discourse.gohugo.io/t/absolutify-all-urls-in-a-content-for-full-text-rss-feed/25039
**Category:** support
**Created:** [April 26, 2020, 1:14pm UTC](https://discourse.gohugo.io/t/absolutify-all-urls-in-a-content-for-full-text-rss-feed/25039 "2020-04-26T13:14:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jgs](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jgs](https://discourse.gohugo.io/u/jgs)
#### Post date: [April 26, 2020, 1:14pm UTC](https://discourse.gohugo.io/t/absolutify-all-urls-in-a-content-for-full-text-rss-feed/25039/1 "2020-04-26T13:14:52Z")

</div>

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 ` ![my image]() 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! 🙂

---

<div class="post-metadata">

### Author: ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)
#### Post date: [April 26, 2020, 4:09pm UTC](https://discourse.gohugo.io/t/absolutify-all-urls-in-a-content-for-full-text-rss-feed/25039/2 "2020-04-26T16:09:04Z")

</div>

Don’t care about it, set xml:base in the \<rss … \> element.  
Check [https://www.w3.org/TR/xmlbase/](https://www.w3.org/TR/xmlbase/)

---

<div class="post-metadata">

### Author: ![jgs](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jgs](https://discourse.gohugo.io/u/jgs)
#### Post date: [April 26, 2020, 5:29pm UTC](https://discourse.gohugo.io/t/absolutify-all-urls-in-a-content-for-full-text-rss-feed/25039/3 "2020-04-26T17:29:32Z")

</div>

Thank you very much, works like a charm!

---

<div class="post-metadata">

### Author: ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)
#### Post date: [April 28, 2020, 5:29pm UTC](https://discourse.gohugo.io/t/absolutify-all-urls-in-a-content-for-full-text-rss-feed/25039/4 "2020-04-28T17:29:37Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
