mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
Fix share link building when params
particle is present
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.
This commit is contained in:
parent
1a8ac5d581
commit
78b68214ff
@ -10,7 +10,7 @@
|
|||||||
{{- $link := fmt.Printf "%s%s" $setup.link "?" -}}
|
{{- $link := fmt.Printf "%s%s" $setup.link "?" -}}
|
||||||
{{- range $key, $value := $setup.particles -}}
|
{{- range $key, $value := $setup.particles -}}
|
||||||
{{- if compare.Eq $key "params" -}}
|
{{- if compare.Eq $key "params" -}}
|
||||||
{{- $link = fmt.Printf "%s%s%s" $permalink $separator $value -}}
|
{{- $link = fmt.Printf "%s%s%s" $link $separator $value -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- if compare.Eq $value "description" -}}
|
{{- if compare.Eq $value "description" -}}
|
||||||
{{- $link = fmt.Printf "%s%s%s" $link $separator (collections.Querify $key $description) -}}
|
{{- $link = fmt.Printf "%s%s%s" $link $separator (collections.Querify $key $description) -}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user