Merge pull request #121 from SanchithHegde/hooks-new-tab
layouts: Add markdown render hook to open links in new tab
This commit is contained in:
commit
780787127c
|
@ -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