From 7ba8f536f4708c45d4fe53b6700afd7c96a30f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 20 Oct 2023 20:18:27 +0200 Subject: [PATCH] config: even more filtered warnings #693 --- layouts/partials/opengraph.html | 5 ++++- layouts/partials/twitter_cards.html | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html index 046119d150..a79c42b9ce 100644 --- a/layouts/partials/opengraph.html +++ b/layouts/partials/opengraph.html @@ -115,7 +115,10 @@ {{- else }} {{- with site.Social.facebook_admin }} {{- $facebookAdmin = . }} - {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }} + {{- $hugoVersion := "0.120.0" }} + {{- if ge hugo.Version $hugoVersion }} + {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }} + {{- end }} {{- end }} {{- end }} diff --git a/layouts/partials/twitter_cards.html b/layouts/partials/twitter_cards.html index 9a69d25ad5..51a92a069a 100644 --- a/layouts/partials/twitter_cards.html +++ b/layouts/partials/twitter_cards.html @@ -51,7 +51,10 @@ {{- else }} {{- with site.Social.twitter }} {{- $twitterSite = . }} - {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }} + {{- $hugoVersion := "0.120.0" }} + {{- if ge hugo.Version $hugoVersion }} + {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }} + {{- end }} {{- end }} {{- end }}