diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index 95f037cc..fc922834 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -42,18 +42,11 @@ {{ end }}{{ end }} {{- end }} -{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}} -{{- $facebookAdmin := "" }} +{{- /* Facebook Page Admin ID for Domain Insights */}} {{- with site.Params.social }} {{- if reflect.IsMap . }} - {{- $facebookAdmin = .facebook_admin }} - {{- end }} -{{- else }} - {{- with site.Social.facebook_admin }} - {{- $facebookAdmin = . }} - {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }} + {{- with .facebook_admin }} + + {{- end }} {{- end }} {{- end }} - -{{- /* Facebook Page Admin ID for Domain Insights */}} -{{ with $facebookAdmin }}{{ end }} diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html index 46b0d041..5d812f6a 100644 --- a/layouts/partials/templates/twitter_cards.html +++ b/layouts/partials/templates/twitter_cards.html @@ -16,23 +16,16 @@ {{- end }} -{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}} + {{- $twitterSite := "" }} {{- with site.Params.social }} {{- if reflect.IsMap . }} - {{- $twitterSite = .twitter }} - {{- end }} -{{- else }} - {{- with site.Social.twitter }} - {{- $twitterSite = . }} - {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }} + {{- with .twitter }} + {{- $content := . }} + {{- if not (strings.HasPrefix . "@") }} + {{- $content = printf "@%v" . }} + {{- end }} + + {{- end }} {{- end }} {{- end }} - -{{- with $twitterSite }} - {{- $content := . }} - {{- if not (strings.HasPrefix . "@") }} - {{- $content = printf "@%v" $twitterSite }} - {{- end }} - -{{- end }}