diff options
Diffstat (limited to 'tpl/tplimpl/embedded')
-rw-r--r-- | tpl/tplimpl/embedded/templates/opengraph.html | 15 | ||||
-rw-r--r-- | tpl/tplimpl/embedded/templates/twitter_cards.html | 22 |
2 files changed, 11 insertions, 26 deletions
diff --git a/tpl/tplimpl/embedded/templates/opengraph.html b/tpl/tplimpl/embedded/templates/opengraph.html index f3f41121c..bbe4e5dd0 100644 --- a/tpl/tplimpl/embedded/templates/opengraph.html +++ b/tpl/tplimpl/embedded/templates/opengraph.html @@ -34,18 +34,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 }} + <meta property="fb:admins" content="{{ . }}" /> + {{- end }} {{- end }} {{- end }} - -{{- /* Facebook Page Admin ID for Domain Insights */}} -{{ with $facebookAdmin }}<meta property="fb:admins" content="{{ . }}" />{{ end }} diff --git a/tpl/tplimpl/embedded/templates/twitter_cards.html b/tpl/tplimpl/embedded/templates/twitter_cards.html index e66a5029a..c445efdfc 100644 --- a/tpl/tplimpl/embedded/templates/twitter_cards.html +++ b/tpl/tplimpl/embedded/templates/twitter_cards.html @@ -8,23 +8,15 @@ <meta name="twitter:title" content="{{ .Title }}"/> <meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/> -{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}} {{- $twitterSite := "" }} {{- with site.Params.social }} {{- if reflect.IsMap . }} - {{- $twitterSite = .twitter }} + {{- with .twitter }} + {{- $content := . }} + {{- if not (strings.HasPrefix . "@") }} + {{- $content = printf "@%v" . }} + {{- end }} + <meta name="twitter:site" content="{{ $content }}"/> + {{- end }} {{- end }} -{{- else }} - {{- with site.Social.twitter }} - {{- $twitterSite = . }} - {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }} - {{- end }} -{{- end }} - -{{- with $twitterSite }} - {{- $content := . }} - {{- if not (strings.HasPrefix . "@") }} - {{- $content = printf "@%v" $twitterSite }} - {{- end }} -<meta name="twitter:site" content="{{ $content }}"/> {{- end }} |