Create render-link.html

This commit is contained in:
何夕2077
2025-08-12 16:45:55 +08:00
committed by GitHub
parent e677c0612e
commit b6790a1c37

View File

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