revuoxmrtheme/layouts/_default/_markup/render-link.html
Kumi 26f0a266ec
feat: add custom link renderer for improved URL handling
Introduced a custom link renderer in the default layout to create links with enhanced URL safety and behavior. Links now open in a new tab if they start with "http", and include a title attribute if provided. This ensures better user experience and security.
2024-07-23 11:16:05 +02:00

1 line
No EOL
177 B
HTML

<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text | safeHTML }}</a>