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: .Site.Social deprecated in Hugo v0.124.0 #711

Open
henry63 opened this issue Sep 9, 2024 · 1 comment
Open

bug: .Site.Social deprecated in Hugo v0.124.0 #711

henry63 opened this issue Sep 9, 2024 · 1 comment
Assignees
Labels
bug Waiting Waiting on a response or other action

Comments

@henry63
Copy link

henry63 commented Sep 9, 2024

With hugo 0.134, and anake 33fbda0 the file ananke/layouts/partials.social-share.html cause 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.`

This happens even if this code is not present

[[params.ananke_socials]]
name = "twitter"

This is probably caused by line 6,7,8 of ananke/layouts/partials.social-share.html

{{ with site.Social.twitter }}
  {{ $twitter_href = printf "%s&via=%s" $twitter_href . }}
{{ end }}

@davidsneighbour davidsneighbour self-assigned this Sep 19, 2024
@davidsneighbour davidsneighbour changed the title .Site.Social was deprecated in Hugo v0.124.0 / present in ananke/layouts/partials.social-share.html bug: .Site.Social deprecated in Hugo v0.124.0 Sep 19, 2024
@davidsneighbour
Copy link
Collaborator

Hi @henry63. Please have a look at #715 for a quick solution.

  • add a username = "your_twitter_username" in your Twitter configuration under params > ananke_socials
  • copy the full file into layouts/partials/social-share.html in your project folder (NOT in the theme folder) to override the current state of the theme.

I might not merge this fix (yet) because the integration of social media profiles should be overhauled, which is a breaking change. I'll update this issue report when there is an update.

@davidsneighbour davidsneighbour added the Waiting Waiting on a response or other action label Sep 19, 2024
@davidsneighbour davidsneighbour modified the milestones: unplanned, v2.10 Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Waiting Waiting on a response or other action
Projects
None yet
Development

No branches or pull requests

2 participants