mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
open all external links in new tabs with "rel=noreferrer"
This commit is contained in:
parent
d0d8eb51ce
commit
e058a11a5f
3
layouts/_default/_markup/render-link.html
Normal file
3
layouts/_default/_markup/render-link.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<!-- Source: https://roneo.org/en/hugo-open-external-links-in-a-new-tab/ -->
|
||||||
|
|
||||||
|
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="nofollow noopener noreferrer" {{ end }}>{{ .Text | safeHTML }}</a>
|
Loading…
Reference in New Issue
Block a user