diff options
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/robotstxt_test.go | 1 | ||||
-rw-r--r-- | hugolib/site.go | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/hugolib/robotstxt_test.go b/hugolib/robotstxt_test.go index b0a843a7e..b88d2243b 100644 --- a/hugolib/robotstxt_test.go +++ b/hugolib/robotstxt_test.go @@ -36,6 +36,7 @@ func TestRobotsTXTOutput(t *testing.T) { hugofs.InitMemFs() viper.Set("baseurl", "http://auth/bub/") + viper.Set("enableRobotsTXT", true) s := &Site{ Source: &source.InMemorySource{ByteSource: WEIGHTED_SOURCES}, diff --git a/hugolib/site.go b/hugolib/site.go index 53e37bfbf..ea9297b3d 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -1864,7 +1864,7 @@ func (s *Site) RenderSitemap() error { } func (s *Site) RenderRobotsTXT() error { - if viper.GetBool("DisableRobotsTXT") { + if !viper.GetBool("EnableRobotsTXT") { return nil } |