return i.Environment == EnvironmentProduction
}
+func (i Info) IsExtended() bool {
+ return IsExtended
+}
+
// NewInfo creates a new Hugo Info object.
func NewInfo(environment string) Info {
if environment == "" {
c.Assert(hugoInfo.Environment, qt.Equals, "production")
c.Assert(string(hugoInfo.Generator()), qt.Contains, fmt.Sprintf("Hugo %s", hugoInfo.Version()))
c.Assert(hugoInfo.IsProduction(), qt.Equals, true)
+ c.Assert(hugoInfo.IsExtended(), qt.Equals, IsExtended)
devHugoInfo := NewInfo("development")
c.Assert(devHugoInfo.IsProduction(), qt.Equals, false)
hugo.BuildDate
: the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00`
+hugo.IsExtended {{< new-in "0.83.0" >}}
+: whether this is the extended Hugo binary.
+
hugo.IsProduction
: returns true if `hugo.Environment` is set to the production environment