Skip to content

Commit 9825f72

Browse files
committed
another fix
1 parent 984687e commit 9825f72

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

themes/devopsdays-theme/layouts/partials/footer_scripts.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@
6767
{{- range $shares -}}
6868
{{- $share_str := "" -}}
6969
{{- $current_item := . -}}
70-
{{- $share_type_val := index $current_item "share" -}}
71-
{{- if $share_type_val -}}
72-
{{- $share_str = printf "{share: \"%s\", via: '%s'}" $share_type_val ($.Scratch.Get "twitter_handle") -}}
73-
{{- else -}}
70+
{{- if or (eq $current_item "email") (eq $current_item "facebook") (eq $current_item "linkedin") -}}
7471
{{- $share_str = printf "\"%s\"" $current_item -}}
72+
{{- else -}}
73+
{{- $twitter_share_val := index $current_item "share" -}}
74+
{{- if $twitter_share_val -}}
75+
{{- $share_str = printf "{share: \"%s\", via: '%s'}" $twitter_share_val ($.Scratch.Get "twitter_handle") -}}
76+
{{- end -}}
7577
{{- end -}}
7678
{{- if $share_str -}}
7779
{{- $shares_js_parts = $shares_js_parts | append $share_str -}}

0 commit comments

Comments
 (0)