Skip to content

Commit 984687e

Browse files
committed
fix footer
1 parent 69b822d commit 984687e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@
6666
{{- $shares_js_parts := slice -}}
6767
{{- range $shares -}}
6868
{{- $share_str := "" -}}
69-
{{- $share_type := "" -}}
70-
{{- $share_via := "" -}}
71-
{{- with .share -}}
72-
{{- $share_type = . -}}
73-
{{- $share_via = ($.Scratch.Get "twitter_handle") -}}
74-
{{- $share_str = printf "{share: \"%s\", via: '%s'}" $share_type $share_via -}}
69+
{{- $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") -}}
7573
{{- else -}}
76-
{{- $share_str = printf "\"%s\"" . -}}
74+
{{- $share_str = printf "\"%s\"" $current_item -}}
7775
{{- end -}}
7876
{{- if $share_str -}}
7977
{{- $shares_js_parts = $shares_js_parts | append $share_str -}}

0 commit comments

Comments
 (0)