hugo-stanley/layouts/_default/_markup/render-link.html

5 lines
230 B
HTML
Raw Normal View History

2020-03-03 18:56:59 +01:00
{{- $url := .Destination | safeURL -}}
{{- $text := .Text | safeHTML -}}
<a href="{{- $url -}}"
{{- with .Title -}}title="{{- . -}}"{{- end -}}
{{- if strings.HasPrefix $url "http" -}}target="_blank"{{- end -}}>{{- $text -}}</a>