Update render-link.html

This commit is contained in:
何夕2077
2025-09-09 21:58:44 +08:00
committed by GitHub
parent f59112ba59
commit 03ac2162e9

View File

@@ -1,7 +1,7 @@
<!-- layouts/_default/_markup/render-link.html -->
<a href="{{ .Destination | safeURL }}"
{{ with .Title }} title="{{ . }}"{{ end }}
{{ if strings.HasPrefix .Destination "http" }}
{{ if and (strings.HasPrefix .Destination "http") (not (strings.HasPrefix .Destination site.BaseURL)) }}
target="_blank" rel="nofollow noopener noreferrer"
{{ end }}
>