diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2021-01-19 20:30:52 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2021-01-19 20:30:52 +0300 |
commit | ff882a4958ecd570f587099e27ac815aea895e65 (patch) | |
tree | d296a93488f568cea4186c6ee21b2c9239599284 /lib | |
parent | 60a9757a9e94ad19aa1f6285449c32e03614c4c9 (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 'lib')
-rw-r--r-- | lib/helpers/generic.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/helpers/generic.rb b/lib/helpers/generic.rb index 264ba497..76399023 100644 --- a/lib/helpers/generic.rb +++ b/lib/helpers/generic.rb @@ -16,7 +16,7 @@ module Nanoc::Helpers # which they are considered production. # def production_and_default_branch? - ENV['NANOC_ENV'] == 'production' and ENV['CI_DEFAULT_BRANCH'] == ENV['CI_COMMIT_BRANCH'] + ENV['NANOC_ENV'] == 'production' and ENV['CI_DEFAULT_BRANCH'] == ENV['CI_COMMIT_REF_NAME'] end # |