make external links open by default on a new tab

This commit is contained in:
Nuno Coração 2022-10-09 12:22:22 +01:00
parent 7f07ccdd79
commit 99788cad77

View file

@ -0,0 +1,3 @@
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
{{ .Text | safeHTML }}
</a>