RelPermalinks in RSS?

The RSS output for my dev site is fine eg <link>http://localhost:1313/blog/240203-newsletter/</link>

However, the RSS output for the live site appears to be rendered as a RelPermalink eg <link>/blog/240203-newsletter/</link>

Any ideas where I can start looking to fix this?

I’ve checked package.json to see if there’s any odd build commands, and had a look at hugo.toml for RSS configuration but can’t find anything obvious. And now I am scratching my head!

You need to set the baseURL in e.g. hugo.toml (or config.toml):

baseURL = "https://example.org"

I thought this was it for a moment, but for Forestry compatibility, the theme authors had put hugo.toml in the root directory and in /config/_default/hugo.toml, and the baseURL is set in there

I moved everything in to the config hugo.toml and deleted the other one to see if that made a difference but still getting RelPermalinks on the RSS.

I’ll have another look at the RSS template, which I copied verbatim from this forum, to make sure I haven’t missed something.

Thank you!

Edit: just checked if .Permalink used elsewhere, and it is eg

<a href="{{.Permalink}}" class="d-block text-dark">
  <h4 class="fw-700 mt-4 mb-3">{{.Title}}</h4>
</a>

in layouts/author/list.html and that also renders as a RelPermalink: https://hopegarden.uk/author/

So a site-wide phenomenon, will dig deeper

Found it! For some reason baseURL set to / in netlify.toml

HUGO_BASEURL = "/"

Thanks for the headsup @bep :slight_smile:

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