{{- $external := cond (urls.Parse .Destination).IsAbs (not (strings.HasSuffix .Destination site.BaseURL)) false -}}
{{- $target := partial "paige/func-target.html" (dict "page" .Page "url" .Destination) -}}

<a {{ with .Destination }} href="{{ . }}" {{ end }} {{ if $external }} rel="external" {{ end }} {{ with $target }} target="{{ . }}" {{ end }} {{ with .Title }} title="{{ . }}" {{ end }}>{{ .Text }}</a>
