From 8762f563f9bf0d35a1c3ece6bf8bdd1fc63b054c Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <patrick@davids-neighbour.com>
Date: Sun, 20 Oct 2024 10:23:51 +0000
Subject: [PATCH] theme(fix): making sure the noopener rel attribute stays even with other configurations

---
 layouts/partials/social/follow.html |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/layouts/partials/social/follow.html b/layouts/partials/social/follow.html
index 2ac075e..a042527 100644
--- a/layouts/partials/social/follow.html
+++ b/layouts/partials/social/follow.html
@@ -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) -}}
@@ -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">

--
Gitblit v1.10.0