Is there a global toggle to hide protocol (https) from rendered URLs?

Hello everyone, I’m new to Hugo.

Plain URLs in Markdown are automatically converted into HTML links, but with the https:// visible as text.

I can of course do [](, but as I’m creating large documentation with tons of such external links, I was wondering if there’s a way to globally turn any into <a href=""></a> instead.


You can search and replace across multiple files, so there’s one option.

I suggest using a text editor, rather than a Hugo template to do so. I don’t know of a toggle such as you describe. :slight_smile:

Hi Adrian. Welcome to the Hugo forums. You can create a shortcode like this to automatically strip off the scheme from your external links. TBH this should probably be default behavior in Goldmark, the Markdown-like content processor Hugo started using in version 0.60.

1 Like