mirror of
https://github.com/tiennm99/tsuki.git
synced 2026-09-01 14:21:49 +00:00
Add skip-to-content link, enhance focus indicators, implement custom render hooks for links and images, fix giscus dark mode paint issue.
12 lines
443 B
HTML
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>
|
|
{{- /**/ -}}
|