mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-01-11 14:03:19 -05:00
fix(render-link): add rel='noopener' for external links
This commit is contained in:
parent
077d477f7f
commit
439996f230
@ -1,4 +1,5 @@
|
||||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}
|
||||
{{ if strings.HasPrefix .Destination "http" }} rel="noopener"{{ end }}
|
||||
{{ if and site.Params.ExternalLinksIcon (strings.HasPrefix .Destination "http") }} class="external-link"{{ end }}
|
||||
{{ if and site.Params.ExternalLinksNewTab (strings.HasPrefix .Destination "http") }} target="_blank"{{ end }}
|
||||
>{{ .Text }}</a>
|
||||
|
Loading…
Reference in New Issue
Block a user