mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
common/hugo: Add hugo.IsServer and hugo.IsDevelopment
And deprecate site.IsServer. Closes #11510
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
274852bcf2
commit
d1b4458536
@@ -31,11 +31,17 @@ relatedfuncs: []
|
||||
`hugo.GoVersion`
|
||||
: (`string`) The Go version used to compile the Hugo binary (e.g., `go1.20.4`). {{< new-in "0.101.0" >}}
|
||||
|
||||
`hugo.IsDevelopment`
|
||||
: (`bool`) Returns `true` if `hugo.Environment` is "development".
|
||||
|
||||
`hugo.IsExtended`
|
||||
: (`bool`) Returns `true` if the Hugo binary is the extended version.
|
||||
|
||||
`hugo.IsProduction`
|
||||
: (`bool`) Returns `true` if `hugo.Environment` is set to the production environment.
|
||||
: (`bool`) Returns `true` if `hugo.Environment` is "production".
|
||||
|
||||
`hugo.IsServer`
|
||||
: (`bool`) Returns `true` if the site is being served with Hugo's built-in server.
|
||||
|
||||
`hugo.Version`
|
||||
: (`hugo.VersionString`) The current version of the Hugo binary (e.g., `0.112.1`).
|
||||
|
Reference in New Issue
Block a user