Absolute URL in KirbyText link that works for both local and live?

Hi,

I just realized I stumbled across a problem as a beginner.

I’ve been using KirbyText link for all my hyperlinks, but because I’m building my website locally first, I ended up using relative urls like: (link: /blog/post-name text: some text title: some title) so that I can click through the links when testing my local installation.

But… I realized that will cause a problem when I upload this to my live server eventually, as when I do get around to installing RSS, all the links will break.

Is there anyway to write absolute URLs in KirbyText links?

Thank you!

Wouldn’t the RSS feed be populated from pages in your content folder, not the link field used on a specific page?

If for some reason you still need to change the relative URLs to absolute, you could either do a find and replace or you can prepend the website domain at the start when generating the RSS feed.

I’d expect/hope for the RSS implementation/plugin to convert relative links to absolute links.

Relative links added via the kirbytext link tag are automatically converted to absolute links.

1 Like