diff options
author | Joe Mooring <joe.mooring@veriphor.com> | 2023-09-29 10:23:08 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-10-06 16:26:51 +0200 |
commit | d1b4458536372a4f8b60395bf867702571169362 (patch) | |
tree | 0529b2a206254412e47dcbadaf97e427d5e696ee /hugolib | |
parent | 274852bcf254230fae30bed4883049ec94462e85 (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.go | 2 |
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 } |