From 58e742ef62f789842e1616328e60127da632de8a Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Fri, 25 Oct 2024 20:05:18 -0300 Subject: [PATCH] theme(fix): share link building when `params` particle is present (#769) In these cases the site permalink is used instead of the social network URL for sharing as defined in the `link` value (https://www.linkedin.com/shareArticle in the below example) Most visible case is LinkedIn but all social networks that have ```toml [ananke.social.networks.particles] ... params = "..." ``` in `config/_default/params.toml` are affected by this bug. Closes #768. --- layouts/partials/func/social/getShareLink.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/func/social/getShareLink.html b/layouts/partials/func/social/getShareLink.html index 5025ae9..49c9390 100644 --- a/layouts/partials/func/social/getShareLink.html +++ b/layouts/partials/func/social/getShareLink.html @@ -10,7 +10,7 @@ {{- $link := fmt.Printf "%s%s" $setup.link "?" -}} {{- range $key, $value := $setup.particles -}} {{- if compare.Eq $key "params" -}} - {{- $link = fmt.Printf "%s%s%s" $permalink $separator $value -}} + {{- $link = fmt.Printf "%s%s%s" $link $separator $value -}} {{- else -}} {{- if compare.Eq $value "description" -}} {{- $link = fmt.Printf "%s%s%s" $link $separator (collections.Querify $key $description) -}}