Is there a simpler way to implement target="_blank"
and rel="nofollow"
into the markdown links?
Since Raw HTML is disabled by default from Hugo 0.60.0, I don’t want to use the option
unsafe= true
option to get it to work.
I have found a way to get this to work using markup but I want to avoid using target="_blank" and rel=“nofollow” on links which are part of the base URL.
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text }}</a>
I would appreciate if someone could point me in the right direction.