-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add hugo.IsServer as alias of site.IsServer #11510
Comments
I agree that's a better place for it, but also want to clarify that hugo.IsProduction and site.IsServer are two very different things:
And I think |
Yeah, I was changing the code because it was testing for prod but it really needed to be testing for server vs compiled. |
Yes, we should do this. I have found that the most useful construct in this department is:
The above works if you have additional "production like" environments (staging ...). So, maybe we should add a |
And deprecate site.IsServer. Closes gohugoio#11510
And deprecate site.IsServer. Closes #11510
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I was changing some code from
hugo.IsProduction
and I tried writinghugo.IsServer
, which it turns out does not work. This is should besite.IsServer
instead. But why? I think the answer is thatsite.IsServer
predates thehugo
action. Now that we havehugo
, I thinksite.IsServer
should be removed from the docs (although maybe not actually removed for a long time) andhugo.IsServer
should be added.The text was updated successfully, but these errors were encountered: