Removed deprecated site.social use (#41)

This commit is contained in:
Ian 2025-06-20 19:41:29 +01:00 committed by GitHub
parent 7d1bd7911a
commit 467c7b2925
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,17 +74,11 @@
{{ end }}{{ end }} {{ end }}{{ end }}
{{- end }} {{- end }}
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
{{- $facebookAdmin := "" }} {{- $facebookAdmin := "" }}
{{- with site.Params.social }} {{- with site.Params.social }}
{{- if reflect.IsMap . }} {{- if reflect.IsMap . }}
{{- $facebookAdmin = .facebook_admin }} {{- $facebookAdmin = .facebook_admin }}
{{- end }} {{- end }}
{{- else }}
{{- with site.Social.facebook_admin }}
{{- $facebookAdmin = . }}
{{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }}
{{- end }}
{{- end }} {{- end }}
{{- /* Facebook Page Admin ID for Domain Insights */}} {{- /* Facebook Page Admin ID for Domain Insights */}}
@ -97,17 +91,11 @@
<meta name="twitter:title" content="{{ .Title }}"/> <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 -}}"/> <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 := "" }} {{- $twitterSite := "" }}
{{- with site.Params.social }} {{- with site.Params.social }}
{{- if reflect.IsMap . }} {{- if reflect.IsMap . }}
{{- $twitterSite = .twitter }} {{- $twitterSite = .twitter }}
{{- end }} {{- end }}
{{- else }}
{{- with site.Social.twitter }}
{{- $twitterSite = . }}
{{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }}
{{- end }}
{{- end }} {{- end }}
{{- with $twitterSite }} {{- with $twitterSite }}