There’s a long story behind this, but the behavior is correct.
When you call a shortcode using the {{< >}} notation, we replace the shortcode call with a unique placeholder (a short string without whitespace) before sending the content to the markdown renderer (Goldmark). When we get the rendered content back from Goldmark, we replace the placeholder with the rendered shortcode.
With this markdown:
<{{< ref "hello-world" >}}>
We’re sending something like this to the markdown renderer:
<HAHAHUGOSHORTCODE-s0-HBH>
The markdown renderer interprets that as raw HTML, which for security reasons is omitted by default. You can check this yourself by viewing source in your browser. You’ll see this:
<!-- raw HTML omitted -->
If you want to allow raw HTML within your markdown, change your site configuration:
[markup.goldmark.renderer]
unsafe = true
If I were you I would use the the {{% %}} notation instead.
Also note that the related relref shortcode was made obsolete by render hooks.
git clone --single-branch -b hugo-forum-topic-50784 https://github.com/jmooring/hugo-testing hugo-forum-topic-50784
cd hugo-forum-topic-50784
hugo server
Right, I mean with unsafe = true it still doesn’t render when using <{{< ref "hello-world" >}}>. The previous comment you wrote made it seem like setting unsafe would allow it to render?