From 26cf73029abc713a18ef51ec55172514e51e54dc Mon Sep 17 00:00:00 2001
From: Regis Philibert <login@regisphilibert.com>
Date: Tue, 15 Jun 2021 15:47:37 +0000
Subject: [PATCH] Refactor social service logic
---
layouts/partials/social-share.html | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/layouts/partials/social-share.html b/layouts/partials/social-share.html
index f5a56b7..13cdb56 100644
--- a/layouts/partials/social-share.html
+++ b/layouts/partials/social-share.html
@@ -3,13 +3,13 @@
{{ $facebook_href := printf "https://www.facebook.com/sharer.php?u=%s" $url }}
{{ $twitter_href := printf "https://twitter.com/share?url=%s&text=%s" $url $title }}
-{{ with .Site.Social.twitter }}
+{{ with site.Social.twitter }}
{{ $twitter_href = printf "%s&via=%s" $twitter_href . }}
{{ 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 }}
-{{ $services := where (partialCached "func/socials/GetSocials" "socials/GetSocials") "share" true }}
+{{ $services := where (partialCached "func/socials/Get" "socials/Get") "share" true }}
{{ if not .Params.disable_share }}
<div id="sharing" class="mt3 ananke-socials">
{{ range $service := $services }}
--
Gitblit v1.10.0