-
Notifications
You must be signed in to change notification settings - Fork 473
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
Deprecated .Site.IsServer causing build WARNING (ERROR in v0.133.0) #369
Comments
This is a breaking change. Similar deprecated log messages from Hugo have been discussed before in #364. My opinion hasn't changed since then. |
Totally agree with Vimux. |
Mainroad works with the latest version of Hugo (v0.127.0). I don't see build errors when using the latest version of Hugo. It builds as it should. |
|
Looks like this is about to go from a warning to an ERROR, so needs to be attended to. I take the view that we should cater for new users more as if new users get warnings and errors they are more likely to select a different theme that builds without issue. People already using Mainroad, then if they upgrade Mainroad/hugo, they will need to upgrade the theme as well at that time. |
This due to issue with main road : Vimux/Mainroad#369
As of Hugo 0.120.0, `.Site.IsServer` is deprecated, and starting with Hugo 0.132.0, it causes a build error. Unfortunately, this is a breaking upstream change that we can't "fix" on our end. As a result, we had to raise the minimum supported version to v0.54.0 and implement another workaround to ensure compatibility with older versions, not just Hugo v0.120.0 and all subsequent versions. Fix #369
Mainroad theme is designed for experienced users. I am focusing on collaborating with those who have a solid understanding of Hugo and adhere our guidelines. Additionally, I am unable to offer free personal support. Therefore, I would sincerely appreciate if users with minimal exprerience consider exploring alternative themes that may better suit their needs. Thank you. |
As of Hugo 0.120.0, `.Site.IsServer` is deprecated, and starting with Hugo 0.132.0, it causes a build error. Unfortunately, this is a breaking upstream change that we can't "fix" on our end. As a result, we had to raise the minimum supported version to v0.54.0 and implement another workaround to ensure compatibility with older versions, not just Hugo v0.120.0 and all subsequent versions. Fix Vimux#369
Version v0.126.2
hugo warning:
WARN deprecated: .Site.IsServer was deprecated in Hugo v0.120.0 and will be removed in a future release. Use hugo.IsServer instead.
As I use hugo --panicOnWarning, this blocks all CICD deployments from running successfully.
layouts/_default/_baseof.html
Line 38 needs to change from:
{{- if not .Site.IsServer }}
To:
{{- if not hugo.IsServer }}
The text was updated successfully, but these errors were encountered: