{{$src := .Destination | safeURL }} {{$width := index (split .Text "|") 1 | default "auto" }} {{$external := strings.HasPrefix $src "http" }} {{- if $external -}} {{ .Text }} {{- else -}} {{$fixedUrl := (cond (hasPrefix $src "/") $src (printf "%s%s" .Page.File.Dir $src)) | urlize}} {{ .Text }} {{- end -}}