We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a057f77 commit e438679Copy full SHA for e438679
layouts/_partials/footer/links.html
@@ -1,10 +1,14 @@
1
<ul class="td-footer__links-list">
2
{{ range . }}
3
+ {{ $rel := .rel | string -}}
4
{{ $isExternal := hasPrefix .url "http" -}}
5
+ {{ if $isExternal -}}
6
+ {{ $rel = cond $rel (add $rel " noopener") "noopener" -}}
7
+ {{ end -}}
8
<li class="td-footer__links-item" data-bs-toggle="tooltip" title="{{ .name }}" aria-label="{{ .name }}">
9
<a href="{{ .url }}" aria-label="{{ .name }}"
- {{- with .rel }} rel="{{ . }}" {{- end -}}
- {{ if $isExternal }} target="_blank" rel="noopener" {{- end -}}
10
+ {{- if $isExternal }} target="_blank" {{- end -}}
11
+ {{ with $rel }} rel="{{ . }}" {{- end -}}
12
>
13
<i class="{{ .icon }}"></i>
14
</a>
0 commit comments