[PATCH] tpl/tplimpl: Fix deprecation logic in embedded templates

cherry-picked from https://github.com/gohugoio/hugo/commit/cb98e9061b3d62b6f1e635a6cf9a8be57dc3f56c
This commit is contained in:
Joe Mooring
2023-11-04 15:08:01 +05:30
committed by Aditya Telange
parent 3fb112bc85
commit 87df659c18
2 changed files with 13 additions and 5 deletions
+4 -2
View File
@@ -52,8 +52,10 @@
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
{{- $facebookAdmin := "" }}
{{- with site.Params.social.facebook_admin }}
{{- $facebookAdmin = . }}
{{- with site.Params.social }}
{{- if reflect.IsMap . }}
{{- $facebookAdmin = .facebook_admin }}
{{- end }}
{{- else }}
{{- with site.Social.facebook_admin }}
{{- $facebookAdmin = . }}