without a sample repository … it is hard to say
this is my render-link.html
<a href="{{ .Destination | safeURL }}"
{{ with .Title}} title="{{ . }}"{{ end }}
{{ if strings.HasPrefix .Destination "http" }}
target="_blank" rel="noopener noreferrer"
{{ end }} >
{{ .Text }}</a>
the example in the DOC section Configure markup | Hugo uses a complete URL as value - so my hint
Sample from the docs: [test]({{< ref “hello.md#test” >}})
PS: It should work … see
You must use .Page.GetPage
in the hook (I’m not using !) + a hint for me