mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
allow search engines from crawling only on production
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user