aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicholasjohnson.ch>2023-12-02 00:00:00 +0000
committerNicholas Johnson <nick@nicholasjohnson.ch>2023-12-02 00:00:00 +0000
commitf34e453196b85e756b16f5ff668d15c2462948e6778657907ff52821d360309b (patch)
treef89d5dbde436bf6887e62ba2a92db3c8db0aa08d049713cbed1f00f1d113576a /layouts
parente937904459459ae93cc85ac4b642b978c6687c9c83c09bda8fdcdec5b3690f62 (diff)
downloadhugo-theme-journal-f34e453196b85e756b16f5ff668d15c2462948e6778657907ff52821d360309b.tar.gz
hugo-theme-journal-f34e453196b85e756b16f5ff668d15c2462948e6778657907ff52821d360309b.zip
Don't add rel="noreferrer" to non-web links
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/_markup/render-link.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index 7d86f7a..1d39360 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 }}" rel="noreferrer">{{ .Text | safeHTML }}</a> \ No newline at end of file
+{{ $emoji }}<a class="link" href="{{ .Destination | safeURL }}"{{ if strings.HasPrefix .Destination "http" }} rel="noreferrer"{{ end }}>{{ .Text | safeHTML }}</a> \ No newline at end of file