From 21f4d4727e546777102dc48208c2be7348db4679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 5 Apr 2016 22:20:39 +0200 Subject: [PATCH] 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 --- content/extras/robots-txt.md | 3 +-- content/overview/configuration.md | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/content/extras/robots-txt.md b/content/extras/robots-txt.md index 31a902be9..9122ae9d8 100644 --- a/content/extras/robots-txt.md +++ b/content/extras/robots-txt.md @@ -13,13 +13,12 @@ weight: 120 Hugo can generated a customized [robots.txt](http://www.robotstxt.org/) in the [same way as any other templates]({{< ref "templates/go-templates.md" >}}). -By default, it generates a robots.txt, which allows everything, with the following content: +To enable it, just set `enableRobotsTXT` option to `true` in the [configuration file]({{< ref "overview/configuration.md" >}}). By default, it generates a robots.txt, which allows everything, with the following content: ```http User-agent: * ``` -To disable it, just set `disableRobotsTXT` option to `false` in the [command line]({{< ref "commands/hugo.md" >}}) or [configuration file]({{< ref "overview/configuration.md" >}}). Hugo will use the template `robots.txt` according to the following list in descending precedence: diff --git a/content/overview/configuration.md b/content/overview/configuration.md index 33813beb4..e351c651a 100644 --- a/content/overview/configuration.md +++ b/content/overview/configuration.md @@ -95,8 +95,8 @@ Following is a list of Hugo-defined variables that you can configure and their c disableRSS: false # Do not build Sitemap file disableSitemap: false - # Do not build robots.txt file - disableRobotsTXT: false + # Build robots.txt file + enableRobotsTXT: false # edit new content with this editor, if provided editor: "" # Enable Emoji emoticons support for page content.