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 · 4 comments · May be fixed by #745
Open

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

henry63 opened this issue Sep 9, 2024 · 4 comments · May be fixed by #745
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
@jmooring
Copy link
Contributor

jmooring commented Oct 15, 2024

Prior to v0.136.0 this emits a warning.
With v0.136.0 and later this emits an error and fails the build.

@c0r0n3r
Copy link

c0r0n3r commented Oct 16, 2024

Please consider #736

@davidsneighbour
Copy link
Collaborator

davidsneighbour commented Oct 17, 2024

https:/theNewDynamic/gohugo-theme-ananke/milestone/8

It says "due by Oct 20th," and I hope to meet that goal. We are behind with many new features, but deprecations come first, and fixing the overall social media network/icon implementation comes next. With the next release, all "deprecated" warnings should be dealt with, and it shouldn't come to errors from then on (if GoHugo doesn't release so many new releases in a week that it overruns us).

This is, by the way, a complete rework, not just a fix. It will add the ability to Ananke to add whatever social media network icon/link you wish to add.

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

Successfully merging a pull request may close this issue.

4 participants