layouts: Add markdown render hook to open links in new tab
This commit is contained in:
parent
559ccfe896
commit
675564be42
|
@ -0,0 +1,4 @@
|
|||
<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>
|
Loading…
Reference in New Issue