Skip to content

Commit

Permalink
theme(fix): making sure the noopener rel attribute stays even with ot…
Browse files Browse the repository at this point in the history
…her configurations

Signed-off-by: Patrick Kollitsch <[email protected]>
  • Loading branch information
davidsneighbour committed Oct 20, 2024
1 parent 7913086 commit 8762f56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/social/follow.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{- $setup := . -}}
{{- $network := $setup.slug -}}
{{- $profile := index $config $network -}}
{{- $rel := $setup.rel | default "noopener" -}}
{{- $rel := $setup.rel | default "" -}}
{{- $label := $profile.label | default $setup.label -}}

{{- $link := (printf $setup.profile $profile.username) -}}
Expand All @@ -22,7 +22,7 @@
{{- end -}}

{{- $languageDirection := cond (eq $.Site.Language.LanguageDirection "rtl") "ml1" "mr1" -}}
<a href="{{ $link }}" target="_blank" rel="{{ $rel }}"
<a href="{{ $link }}" target="_blank" rel="noopener{{- with $rel }} {{ . -}}{{- end -}}"
class="{{ .name }} ananke-social-link link-transition stackoverflow link dib z-999 pt3 pt0-l {{ $languageDirection }}"
title="follow on {{ $label }} - Opens in a new window"
aria-label="follow on {{ $label }} - Opens in a new window">
Expand Down

0 comments on commit 8762f56

Please sign in to comment.