Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ### Build failure in Hugo 0.136.2 due to deprecated Site.Social #747

Closed
cchessnz opened this issue Oct 19, 2024 · 3 comments · Fixed by #745
Closed

bug: ### Build failure in Hugo 0.136.2 due to deprecated Site.Social #747

cchessnz opened this issue Oct 19, 2024 · 3 comments · Fixed by #745
Assignees

Comments

@cchessnz
Copy link

Error message received during a Hugo build of a project using Ananke as theme:

ERROR deprecated: .Site.Social was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.137.0. Implement taxonomy 'social' or use .Site.Params.Social instead.

Using Hugo 0.135.0, this was a warning, but in Hugo 0.136.2 it is an error by default.

The error is triggered by layouts/partials/social-share.html line {{ with site.Social.twitter }}

I found that changing the above text to site.Params.Social.twitter made the error go away, but am not sure if that is a correct solution or not.

The effect of this is that I have to run under Hugo 0.135.0 on my Azure SWA deployment, instead of my local dev box's 0.136.2 installation .

@cchessnz cchessnz changed the title bug: ### Build failure in Hugh 0.136.2 due to deprecated Site.Social bug: ### Build failure in Hugo 0.136.2 due to deprecated Site.Social Oct 19, 2024
@davidsneighbour davidsneighbour added this to the v2.11 - Social media milestone Oct 19, 2024
@cchessnz
Copy link
Author

cchessnz commented Oct 21, 2024

Since the update, I get new icons for FB, Bluesky and LinkedIn on my nav bar, which link to the profile of a user "<nil>" on each site. Is it possible to disable those if there is not a username configured? I have tried in hugo.toml writing:

[ananke.social.follow]
new_window_icon = false
networks = [
]

(based on what's in your update to exampleSite/config.toml) but that had no effect.

(EDIT: I found that I could fix it by modifying the above code to be [params.ananke.social.follow])

@davidsneighbour
Copy link
Collaborator

Yes, the location of that config is a bit complicated. Whenever we talk about "ananke in the params section" what we mean is under the params in the config. It's explained a bit clearer here but I will make it even more clear over the next days in the readme.

Is your issue solved?

@davidsneighbour
Copy link
Collaborator

It's not our design, it's just complicated to explain and Hugo is very powerful in regards to the config and overriding other configs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants