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

Add markdown render hook to open links in new tab
layouts: Add markdown render hook to open links in new tab
