- {{- $sameSite := true -}}
- {{- $finalDest := .Destination -}}
- {{- if eq (.Destination | relURL) (.Destination | absURL) }}{{ $sameSite = false }}{{ end -}}
- {{- if not $sameSite -}}
- {{- if in $finalDest "?"}}{{ $finalDest = printf "%s%s" $finalDest "&utm_source=indieweb" -}}
- {{- else }}{{ $finalDest = printf "%s%s" $finalDest "?utm_source=indieweb" -}}
- {{- end -}}
- {{- end -}}
- <a href="{{ $finalDest }}"
- {{- if not $sameSite }} target="_blank"
- {{- with .Title }} rel="{{ . | safeHTML }}"{{ end }}
- {{- else }} rel="me"{{ end }}>{{.Text | safeHTML}}</a>
|