1

Fixed title for external and affiliated links

This commit is contained in:
2025-06-30 01:05:35 +02:00
parent 714aadecf5
commit 044c1a673a

View File

@@ -16,7 +16,13 @@
{{- $newURL = printf "%s://%s%s?%s=%s" $parsed.Scheme $host $path $param $value -}} {{- $newURL = printf "%s://%s%s?%s=%s" $parsed.Scheme $host $path $param $value -}}
{{- end }} {{- end }}
{{- end -}} {{- end -}}
<a href="{{ $newURL }}" title="{{ .Title }}" {{- $titlePrefix := "" -}}
{{- if $isExternal -}} rel="noreferrer" class="external-link{{ if $isAffiliated }} affiliated{{ end }}{{ if $isExternal }} external{{ end }}" {{- end -}}> {{- if $isAffiliated -}}
{{- $titlePrefix = "Lien affilié" -}}
{{- else if $isExternal -}}
{{- $titlePrefix = "Lien externe" -}}
{{- end -}}
<a href="{{ $newURL }}" title="{{ $titlePrefix }}{{ .Title }}"
{{- if $isExternal -}} rel="noreferrer" class="external-link{{ if $isAffiliated }} affiliated{{ end }}" {{- end -}}>
{{- .Text | safeHTML -}} {{- .Text | safeHTML -}}
</a> </a>