theme(fix): override profile link generation with full link

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
This commit is contained in:
Patrick Kollitsch 2024-10-20 15:27:19 +07:00
parent ef4a6a0cfe
commit 9254c455c9
No known key found for this signature in database
GPG key ID: 5A5360B005AD68C7

View file

@ -14,7 +14,12 @@
{{- $network := $setup.slug -}} {{- $network := $setup.slug -}}
{{- $profile := index $config $network -}} {{- $profile := index $config $network -}}
{{- $rel := $setup.rel | default "noopener" -}} {{- $rel := $setup.rel | default "noopener" -}}
{{- $link := (printf $setup.profile $profile.username) -}} {{- $link := (printf $setup.profile $profile.username) -}}
{{- with $profile.profilelink -}}
{{- $link = $profile.profilelink -}}
{{- end -}}
{{- $languageDirection := cond (eq $.Site.Language.LanguageDirection "rtl") "ml1" "mr1" -}} {{- $languageDirection := cond (eq $.Site.Language.LanguageDirection "rtl") "ml1" "mr1" -}}
<a href="{{ $link }}" target="_blank" rel="{{ $rel }}" <a href="{{ $link }}" target="_blank" rel="{{ $rel }}"
class="{{ .name }} ananke-social-link link-transition stackoverflow link dib z-999 pt3 pt0-l {{ $languageDirection }}" class="{{ .name }} ananke-social-link link-transition stackoverflow link dib z-999 pt3 pt0-l {{ $languageDirection }}"