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>2021-01-19 20:30:52 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2021-01-19 20:30:52 +0300
commitff882a4958ecd570f587099e27ac815aea895e65 (patch)
treed296a93488f568cea4186c6ee21b2c9239599284 /layouts
parent60a9757a9e94ad19aa1f6285449c32e03614c4c9 (diff)
Add noidex tag for stable branches
We need to stop Google from indexing old docs, so we should make sure the noindex tag is added to all archived docs: https://developers.google.com/search/docs/advanced/crawling/block-indexing. That way Google will stop serving up results for pages 12.10 versions of pages, for example.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/head.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/head.html b/layouts/head.html
index 5bf94d63..c88972d1 100644
--- a/layouts/head.html
+++ b/layouts/head.html
@@ -10,7 +10,7 @@
<meta name="description" content="Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.">
<% end %>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-<% if @item[:noindex] %>
+<% if @item[:noindex] or !production_and_default_branch? %>
<meta name="robots" content="noindex nofollow">
<% end %>
<!--https://community.algolia.com/docsearch/required-configuration.html#introduces-global-information-as-meta-tags-->