diff options
author | Nicholas Johnson <mail@nicholasjohnson.ch> | 2024-11-08 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <mail@nicholasjohnson.ch> | 2024-11-08 00:00:00 +0000 |
commit | a0ccea9bef11f02bad2cfc3f975818f4977d1f4364e94a8366d98abb74614579 (patch) | |
tree | 31dcb8aebb2c04b52305a6f3ee801a3e8afcd37a5da6ebbe66ea9e7b8f917dd9 /layouts/_default/_markup | |
parent | afb2d1be3159702479487ad6b719ac4d974c149d92903c2968692c25db28df8a (diff) | |
download | hugo-theme-journal-a0ccea9bef11f02bad2cfc3f975818f4977d1f4364e94a8366d98abb74614579.tar.gz hugo-theme-journal-a0ccea9bef11f02bad2cfc3f975818f4977d1f4364e94a8366d98abb74614579.zip |
Add "external" to rel attribute for external 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 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 |