File tree Expand file tree Collapse file tree
tpl/tplimpl/embedded/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444
4545{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
4646{{- $facebookAdmin := "" }}
47- {{- with site.Params.social.facebook_admin }}
48- {{- $facebookAdmin = . }}
47+ {{- with site.Params.social }}
48+ {{- if reflect.IsMap . }}
49+ {{- $facebookAdmin = .facebook_admin }}
50+ {{- end }}
4951{{- else }}
5052 {{- with site.Social.facebook_admin }}
5153 {{- $facebookAdmin = . }}
Original file line number Diff line number Diff line change 2222
2323{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}}
2424{{- $twitterSite := "" }}
25- {{- with site.Params.social.twitter }}
26- {{- $twitterSite = . }}
25+ {{- with site.Params.social }}
26+ {{- if reflect.IsMap . }}
27+ {{- $twitterSite = .twitter }}
28+ {{- end }}
2729{{- else }}
2830 {{- with site.Social.twitter }}
2931 {{- $twitterSite = . }}
3234{{- end }}
3335
3436{{- with $twitterSite }}
35- < meta name ="twitter:site " content ="@{{ . }} "/>
37+ {{- $content := . }}
38+ {{- if not (strings.HasPrefix . "@") }}
39+ {{- $content = printf "@%v" $twitterSite }}
40+ {{- end }}
41+ < meta name ="twitter:site " content ="{{ $content }} "/>
3642{{- end }}
You can’t perform that action at this time.
0 commit comments