From a0ccea9bef11f02bad2cfc3f975818f4977d1f4364e94a8366d98abb74614579 Mon Sep 17 00:00:00 2001
From: Nicholas Johnson <mail@nicholasjohnson.ch>
Date: Fri, 8 Nov 2024 00:00:00 +0000
Subject: Add "external" to rel attribute for external links

---
 layouts/_default/_markup/render-link.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'layouts')

diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index def4151..6cadaec 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,2 +1,2 @@
 {{ $emoji := cond (and (not (.Page.Params.makerefs | default true)) (.Page.Params.showlinkemoji | default true)) (emojify ":link: ") "" -}}
-{{ $emoji }}<a class="link" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }} rel="noreferrer">{{ .Text }}</a>
\ No newline at end of file
+{{ $emoji }}<a class="link" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }} rel="{{ if (urls.Parse .Destination).IsAbs }}external {{ end }}noreferrer">{{ .Text }}</a>
\ No newline at end of file
-- 
cgit v1.2.3