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

Theme unusable for Hugo version 0.132.0 and above #43

Open
fstaudt opened this issue Oct 19, 2024 · 3 comments
Open

Theme unusable for Hugo version 0.132.0 and above #43

fstaudt opened this issue Oct 19, 2024 · 3 comments

Comments

@fstaudt
Copy link

fstaudt commented Oct 19, 2024

When used with Hugo version 0.132.0 or above, hugo command fails due to usage of deprecated function .Site.IsServer:

Start building sites … 
hugo v0.132.0-005e895a386e59dd38418066b3280fd98a33c96b+extended windows/amd64 BuildDate=2024-08-12T15:21:36Z VendorInfo=gohugoio

ERROR deprecated: .Site.IsServer was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.133.0. Use hugo.IsServer instead.
Total in 745 ms
Error: error building site: logged 1 error(s)

Could you update the theme to use the alternative function ?

I've identified usages of deprecated function in baseof.html and google-analytics.html.

I can provide a PR if it is OK for you.

@AsenHu
Copy link

AsenHu commented Nov 26, 2024

#44

This issue is fixed in my branch and a PR is currently opened.

Sorry English is not my first language and I just noticed that you fixed this as well.

@fstaudt
Copy link
Author

fstaudt commented Nov 26, 2024

@AsenHu ,

thanks for the PR.

I have only created this issue, I have not created a PR for it.

I noticed that you removed code containing .Site.IsServer in your PR to solve the issue.
Instead of removing the code, you could use the alternative function hugo.IsServer.

@AsenHu
Copy link

AsenHu commented Nov 26, 2024

I'll take a look tomorrow

It should be fine

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

No branches or pull requests

2 participants