mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
Fix deprecation warning for .Site.Social param (hugo 0.124)
This commit is contained in:
parent
91df000ca8
commit
29f50b65a3
@ -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 }}
|
||||
{{/* 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 }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user