common/hugo: Add hugo.IsServer and hugo.IsDevelopment

And deprecate site.IsServer.

Closes #11510
This commit is contained in:
Joe Mooring
2023-09-29 10:23:08 -07:00
committed by Bjørn Erik Pedersen
parent 274852bcf2
commit d1b4458536
7 changed files with 41 additions and 6 deletions

View File

@@ -159,6 +159,7 @@ func TestDecodeCascadeConfig(t *testing.T) {
type testConfig struct {
environment string
running bool
workingDir string
}
@@ -166,6 +167,10 @@ func (c testConfig) Environment() string {
return c.environment
}
func (c testConfig) Running() bool {
return c.running
}
func (c testConfig) WorkingDir() string {
return c.workingDir
}