mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
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
4
layouts/_default/_markup/render-link.html
Normal file
4
layouts/_default/_markup/render-link.html
Normal file
|
@ -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
Block a user