summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-04-05 22:20:39 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-04-05 22:20:39 +0200
commit54750b078059734c3f2047ae3f56cac64a9f0666 (patch)
tree1c26f4b0534696268cac1a8485e96626222ba81f /hugolib
parent43b5dfabb5fb36bb4574289912c66a46ef20ffce (diff)
Do not create robots.txt by default
Meny people, including me, have a custom robots.txt in static. Also remove that option from the command line; it doesn't feel important enough. Fixes ##2049
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/robotstxt_test.go1
-rw-r--r--hugolib/site.go2
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
}