.Site.Social is deprecated warning - but I don't use this param

Hi.

When starting the dev server I get a warning:

WARN  deprecated: .Site.Social was deprecated in Hugo v0.124.0 and will be removed in a future release. Use .Site.Params instead.

Ok, understood, but I never used .Site.Social anywhere in my site, and neither does the theme. I grepped all files in my site, no such string to be found. Am I missing something?

Cheers,
Ekki

I doubt hugo is warning for an unusrd deprecation.

Maybe the theme is oading ogher components…

Which theme from which repo.

A link to your repo may help

Your hugo version?

Hi, irkode, thanks.

Theme: PaperMod
from: GitHub - adityatelange/hugo-PaperMod: A fast, clean, responsive Hugo theme.
My Repo: does not exist
Hugo version: hugo v0.135.0+extended linux/amd64 BuildDate=unknown

Cheers,
Ekki

Actually the theme uses ā€œ.Site.Socialā€ in two partials included at the end of _layouts/partials/head.html which use the .Site.Social parameter

{{- template "partials/templates/opengraph.html" . }}
{{- template "partials/templates/twitter_cards.html" . }}

There’s an open issue about that in the paperModRepo: [BUG] Deprecation of .Site.Social Ā· Issue #1573 Ā· adityatelange/hugo-PaperMod Ā· GitHub

As of now that’s a warning, so as long as you stay on Hugo version that not removes the deprecated stuff you are quite safe.
There’s a also a workaround described by adding social = true to the params section

p.s. there’s also another deprecation about the paginate site setting

1 Like

Oh my. Thanks irkode.

I wonder where my grep-foo failed. Probably because I took the warning message about ā€˜.Site.Social’ too literally and searched for that, without disambiguiation of Upper/lower case. So I didn’t find ā€˜site.Social’.

I have to admit that the mixed use of upper/lower case parameters, methods etc in Hugo ihas nagged me before. Same applies to pluralization of terms. Or not. :slight_smile:

The other deprecation about ā€˜paginate’ I found easily and rectified it as advised.

Many thanks for your help.

Cheers,
Ekki

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.