When I tried to deploy my site today, I received errors that prompted me to upgrade gohugo-theme-ananke that hasn’t resolved the issue of the title and I’m unsure how to resolve it.
When I tried to deploy the site or just hugo server -D, I received errors:
Start building sites …
hugo v0.132.0-DEV-e42263529c35d966b752690ad1bcb461b90b470d+extended linux/amd64 BuildDate=2024-08-11T18:57:15Z VendorInfo=snap:0.131.0+git23.e42263529
WARN deprecated: .Site.Social was deprecated in Hugo v0.124.0 and will be removed in a future release. Use .Site.Params instead.
ERROR deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.133.0. Use .Site.Config.Services.Disqus.Shortname instead.
Curiously the (breaking) ERROR is “will be removed in Hugo 0.133.0” but I’m running Hugo 0.132.0
My Hugo site content (ex-theme) does not reference .Site.Social nor .Site.DisqusShortname and so I assume the error results from the combination with the gohugo-theme-ananke.
I realized I’m using an outdated gohugo-theme-ananke and bumped it:
go get github.com/theNewDynamic/gohugo-theme-ananke@latest
This resulted in other errors which I’ve avoided by deleting the content from my local layouts/_default/baseof.html because…
However, the .Site.Social and .Site.DisqusShortname errors persist.
I cloned gohugo-theme-ananke repo and used the same hugo instance to run its exampleSite which works without issue.
So, my questions are:
What can I do to resolve this error?
Why is hugo bailing on a future ERROR (v0.133.0 vs v0.132.0)?
Why does exampleSite serve (no .Site.DisqusShortname error) when my site (that doesn’t reference .Site.DisqusShortname doesn’t?
That’s what ERROR do in Hugo. We have given this some consideration, and we thought that doing the INFO, WARN and then finally ERROR for about a year should give people enough time to do some search and replace in their templates.
But I’m a little curious; the error message should be clear; what is your question?
I don’t reference .Site.DisqusShortname and yet I’m unable to build the site:
WARN deprecated: .Site.Social was deprecated in Hugo v0.124.0 and will be removed in a future release. Use .Site.Params instead.
ERROR deprecated: .Site.DisqusShortname was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.133.0. Use .Site.Config.Services.Disqus.Shortname instead.
Total in 723 ms
Error: error building site: logged 1 error(s)
Corrollary: I’m getting an error for something I think I’m not doing.
I suspect something is, but it’s difficult to know what that something is without seeing the full picture. It would help if you could share your project repository, privately if you wish.
I may have jumped to the conclusions above and assumed that this was about how we handled deprecations. I slightly apologise for that.
I have looked at the Ananke theme and it looks to be updated, but I notice that they use a versioning/path setup not compatible with Go Modules (which Hugo uses).
I will check up on that and try to get a fix merged upstream to fix this, and get back to you about this tomorrow.