adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
9.59k stars 2.59k forks source link

[BUG] Deprecation of .Site.Social #1573

Open ffha opened 1 month ago

ffha commented 1 month ago

Describe the bug

Steps to reproduce the behavior: Using latest hugo version Run hugo server

Expected behavior: No Deprecation notice

Repo/Source where this issue can be reproduced: N/A

Screenshots N/A

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

adityatelange commented 4 weeks ago

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

Cephra commented 3 weeks ago

If you just want to make it disappear:

hugo.toml

[params]
    social = true

not sure about any side effects though. 🤷🏻

Cephra commented 3 weeks ago

The reason you see the warning is because unless the social option is present, site.Social will be evaluated. https://github.com/adityatelange/hugo-PaperMod/blob/58c4841c26325eaa788d9b13e65d5dfc95d9367c/layouts/partials/templates/twitter_cards.html#L21-L30 & https://github.com/adityatelange/hugo-PaperMod/blob/58c4841c26325eaa788d9b13e65d5dfc95d9367c/layouts/partials/templates/opengraph.html#L46-L56

ffha commented 3 weeks ago

OK, I will try.

ghost commented 3 weeks ago

I get the warning too. And I get the ways you can go to fix it. But it is a bug that will need to be addressed.