sitoctt/layouts/_default/_markup/render-link.html

9 lines
280 B
HTML
Raw Normal View History

2024-08-27 22:55:45 +02:00
{{- $u := urls.Parse .Destination -}}
<a href="{{ .Destination | safeURL }}"
{{- with .Title }} title="{{ . }}" {{ end -}}
{{- if $u.IsAbs }} target="_blank" rel="noopener" {{ end -}}
>
{{- with .Text | safeHTML }}{{ . }}{{ end -}}
</a>
{{- /* chomp trailing newline */ -}}