mirror of https://github.com/docker/docs.git
allow search engines from crawling only on production
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
5a3f44e176
commit
ef40cfffc3
|
@ -30,7 +30,7 @@
|
|||
{%- endif -%}
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
{%- if page.sitemap == false or site.GH_ENV == "gh_pages" %}
|
||||
{%- if page.sitemap == false or jekyll.environment != 'production' %}
|
||||
<meta name="robots" content="noindex"/>
|
||||
{%- endif %}
|
||||
{%- if jekyll.environment == 'production' and site.google_analytics != '' -%}{%- include analytics/google_analytics.html GOOGLE_ID=site.google_analytics -%}{%- endif -%}
|
||||
|
|
10
robots.txt
10
robots.txt
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
layout: null
|
||||
---
|
||||
{%- if jekyll.environment == 'production' -%}
|
||||
User-agent: *
|
||||
|
||||
# Docker Engine archives
|
||||
|
@ -26,3 +30,9 @@ Disallow: /ee/
|
|||
Disallow: /apidocs/v*
|
||||
|
||||
Sitemap: https://docs.docker.com/sitemap.xml
|
||||
{%- else -%}
|
||||
# Disable all indexing on staging websites and Netlify previews to prevent
|
||||
# them showing up in search results.
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in New Issue