2022-08-18 15:20:15 -04:00

6 lines
257 B
HTML

{{- $url := .Destination | safeURL -}}
{{- $text := .Text | safeHTML -}}
<a href="{{- $url -}}"
{{- with .Title -}}title="{{- . -}}"{{- end -}}
{{- if strings.HasPrefix $url "http" -}}target="_blank" rel="noopener noreferrer"{{- end -}}>{{- $text -}}</a>