mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-05-12 22:25:43 -04:00
fix(render-link): add rel='noopener' for external links
This commit is contained in:
parent
a88711ed11
commit
e138f03495
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue