I’m trying to check if .Destination starts with the base URL of my site with the “render-link.html” render hook
(strings.HasPrefix .Destination .Site.BaseURL)
but get an error:
execute of template failed at <.Site.BaseURL>: can’t evaluate field Site in type goldmark.linkContext
According to the documentation the error is correct, as the render link doesn’t receive the .Site context.
Still trying to avoid just pasting the baseURL as string into the render hook - is there a trick to get .Site context where I need / want it?