yequari.com/layouts/_default/_markup/render-link.html

11 lines
296 B
HTML
Raw Normal View History

{{- $u := urls.Parse .Destination -}}
<a href="{{ .Destination | safeURL }}"
{{- with .Title }} title="{{ . }}"{{ end -}}
{{- if $u.IsAbs }} rel="external"{{ end -}}
>
{{- with .Text | safeHTML }}{{ . }}{{ end -}}
</a>{{- if $u.IsAbs }}🔗{{ end -}}
{{- /* chomp trailing newline */ -}}