mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +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
@@ -356,7 +356,9 @@ func newHugoSitesNew(cfg deps.DepsCfg, d *deps.Deps, sites []*Site) (*HugoSites,
|
||||
}
|
||||
|
||||
// Returns true if we're running in a server.
|
||||
// Deprecated: use hugo.IsServer instead
|
||||
func (s *Site) IsServer() bool {
|
||||
helpers.Deprecated(".Site.IsServer", "Use hugo.IsServer instead.", false)
|
||||
return s.conf.Internal.Running
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user