Update render-link.html

This commit is contained in:
何夕2077
2025-09-09 22:06:12 +08:00
committed by GitHub
parent 03ac2162e9
commit e799129d60

View File

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