Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2018-03-23 15:45:35 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2018-03-23 15:45:35 +0300
commit0d8f96cac73873b9e8cc3bf622cac5ee13120c48 (patch)
treedd33d29c53180dc906e4bd3e770dcd3af403b05c /content
parent7eeb5bbfb15b21238ecf1e6e2c9e36cfde465185 (diff)
Allow robots indexing only on master
Diffstat (limited to 'content')
-rw-r--r--content/robots.txt.erb6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/robots.txt.erb b/content/robots.txt.erb
index db1d0b75..b4a4b64f 100644
--- a/content/robots.txt.erb
+++ b/content/robots.txt.erb
@@ -2,4 +2,10 @@
is_hidden: true
---
+<% if ENV['CI_COMMIT_REF_NAME'] == 'master' %>
Sitemap: <%= @items['/sitemap.*'].path %>
+<% else %>
+# Ban all spiders from the entire site when not on master branch
+User-Agent: *
+Disallow: /
+<% end %>