diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-12-02 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-12-02 00:00:00 +0000 |
commit | f34e453196b85e756b16f5ff668d15c2462948e6778657907ff52821d360309b (patch) | |
tree | f89d5dbde436bf6887e62ba2a92db3c8db0aa08d049713cbed1f00f1d113576a /layouts/_default/_markup | |
parent | e937904459459ae93cc85ac4b642b978c6687c9c83c09bda8fdcdec5b3690f62 (diff) | |
download | hugo-theme-journal-f34e453196b85e756b16f5ff668d15c2462948e6778657907ff52821d360309b.tar.gz hugo-theme-journal-f34e453196b85e756b16f5ff668d15c2462948e6778657907ff52821d360309b.zip |
Don't add rel="noreferrer" to non-web links
Diffstat (limited to 'layouts/_default/_markup')
-rw-r--r-- | layouts/_default/_markup/render-link.html | 2 |
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 |