Files
tsuki/layouts/_markup/render-link.html
T
tiennm99 5f10e72b47 feat(a11y): skip-link, focus rings, render hooks, giscus paint fix
Add skip-to-content link, enhance focus indicators, implement custom render
hooks for links and images, fix giscus dark mode paint issue.
2026-05-09 09:32:21 +07:00

12 lines
443 B
HTML

{{- /* External markdown links get rel="noopener noreferrer". No target="_blank" — UX choice. */ -}}
{{- $external := or
(strings.HasPrefix .Destination "http://")
(strings.HasPrefix .Destination "https://")
(strings.HasPrefix .Destination "//")
-}}
<a href="{{ .Destination | safeURL }}"
{{- with .Title }} title="{{ . }}"{{ end -}}
{{- if $external }} rel="noopener noreferrer"{{ end -}}
>{{ .Text | safeHTML }}</a>
{{- /**/ -}}