mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-01-11 22:13:20 -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 }}
|
<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.ExternalLinksIcon (strings.HasPrefix .Destination "http") }} class="external-link"{{ end }}
|
||||||
{{ if and site.Params.ExternalLinksNewTab (strings.HasPrefix .Destination "http") }} target="_blank"{{ end }}
|
{{ if and site.Params.ExternalLinksNewTab (strings.HasPrefix .Destination "http") }} target="_blank"{{ end }}
|
||||||
>{{ .Text }}</a>
|
>{{ .Text }}</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user