File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
themes/devopsdays-theme/layouts/partials Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 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 -}}
You can’t perform that action at this time.
0 commit comments