How To Tell Hugo To Open Links In New Tab

Took too long to fix this one. To open links in new tabs using Hugo’s Goldmark renderer, do the following:

<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>
  {{ .Text }}
</a>

And you’re done.