Files
zerai.xyz/themes/notepadium/layouts/_default/_markup/render-link.html
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>