hugo-stanley/layouts/_default/_markup/render-link.html
2020-03-03 18:56:59 +01:00

5 lines
230 B
HTML

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