Skip to content

Commit

Permalink
layouts: properly deprecate .Site.Social usage
Browse files Browse the repository at this point in the history
Hugo recently started throwing an error when accessing .Site.Social.
This has been deprecated since 0.124 and will be removed in 0.137.

This package's usage to throw its own deprecation warning makes builds
with a recent hugo version fail (so pretty much everyone's)---remove it.

Signed-off-by: Luca Zeuch <l-zeuch@email.de>
  • Loading branch information
l-zeuch committed Oct 22, 2024
1 parent 282c255 commit 2071a89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-keys-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thulite/seo": patch
---

Properly deprecate .Site.Social usage.
5 changes: 0 additions & 5 deletions layouts/partials/seo/opengraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
{{- 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." }}
{{- end }}
{{- end }}

{{- /* Facebook Page Admin ID for Domain Insights */}}
Expand Down
5 changes: 0 additions & 5 deletions layouts/partials/seo/twitter.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
{{- 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." }}
{{- end }}
{{- end }}

{{- with $twitterSite }}
Expand Down

0 comments on commit 2071a89

Please sign in to comment.