diff --git a/layouts/partials/social-share.html b/layouts/partials/social-share.html index 14ae03370..43ad9c584 100644 --- a/layouts/partials/social-share.html +++ b/layouts/partials/social-share.html @@ -3,8 +3,13 @@ {{ $facebook_href := printf "https://www.facebook.com/sharer.php?u=%s" $url }} {{ $twitter_href := printf "https://twitter.com/intent/tweet?url=%s&text=%s" $url $title }} -{{ with site.Social.twitter }} - {{ $twitter_href = printf "%s&via=%s" $twitter_href . }} +{{/* Looking for twitter in the registered services */}} +{{ with site.Params.ananke_socials }} + {{ range $service := . }} + {{ if eq .name "twitter" }} + {{ $twitter_href = printf "%s&via=%s" $twitter_href . }} + {{ end }} + {{ end }} {{ end }} {{ $linkedin_href := printf "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s" $url $title }} {{ $hrefs := dict "facebook" $facebook_href "twitter" $twitter_href "linkedin" $linkedin_href }}