summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2023-09-29 10:23:08 -0700
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-10-06 16:26:51 +0200
commitd1b4458536372a4f8b60395bf867702571169362 (patch)
tree0529b2a206254412e47dcbadaf97e427d5e696ee /hugolib
parent274852bcf254230fae30bed4883049ec94462e85 (diff)
common/hugo: Add hugo.IsServer and hugo.IsDevelopment
And deprecate site.IsServer. Closes #11510
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/site_new.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/hugolib/site_new.go b/hugolib/site_new.go
index 8abd511c3..4db5eeb28 100644
--- a/hugolib/site_new.go
+++ b/hugolib/site_new.go
@@ -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
}