Remove old datacenter docs from sitemap, robots.txt

This commit is contained in:
Joao Fernandes 2016-11-10 12:24:04 -08:00
parent 9622d27531
commit b154bb1152
5 changed files with 46 additions and 3 deletions

View File

@ -19,7 +19,7 @@ gems:
webrick:
headers:
Cache-Control: 600
defaults:
-
scope:
@ -28,3 +28,35 @@ defaults:
values:
layout: docs
archiveserver: "http://54.71.194.30"
-
scope:
path: "datacenter/dtr/2.0"
values:
hide_from_sitemap: true
dtr_latest: 2.1
-
scope:
path: "datacenter/ucp/1.1"
values:
hide_from_sitemap: true
ucp_latest: 2.0
-
scope:
path: "apidocs/v1.3.3"
values:
hide_from_sitemap: true
-
scope:
path: "apidocs/v1.4.0"
values:
hide_from_sitemap: true
-
scope:
path: "apidocs/v2.0.0"
values:
hide_from_sitemap: true
-
scope:
path: "apidocs/v2.0.1"
values:
hide_from_sitemap: true

1
_includes/noindex.html Normal file
View File

@ -0,0 +1 @@
<meta name="robots" content="noindex" />

View File

@ -75,6 +75,7 @@ ng\:form {
<link id="mktoForms2BaseStyle" rel="stylesheet" type="text/css" href="/css/forms2.css">
<link id="mktoForms2ThemeStyle" rel="stylesheet" type="text/css" href="/css/forms2-theme-simple.css">
{% seo %}
{% if page.hide_from_sitemap %}<meta name="robots" content="noindex" />{% endif %}
</head>
<body class="html front not-logged-in no-sidebars page-node page-node- page-node-1 node-type-front-page path-docker ng-scope short retina-display all_loaded" ng-app="Docker" ng-controller="DockerController" style="">
<div class="off-canvas-wrap" data-offcanvas="" style="min-height: 548px;">

View File

@ -1,4 +1,6 @@
User-agent: *
# Docker Engine archives
Disallow: /v1.4/
Disallow: /v1.5/
Disallow: /v1.6/
@ -7,3 +9,10 @@ Disallow: /v1.8/
Disallow: /v1.9/
Disallow: /v1.10/
Disallow: /v1.11/
# Docker Datacenter archives
Disallow: /datacenter/dtr/2.1
Disallow: /datacenter/ucp/1.1
Disallow: /apidocs/v*
Sitemap: https://docs.docker.com/sitemap.xml

View File

@ -12,8 +12,8 @@ layout: null
<loc>https://docs.docker.com/</loc>
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
</url>
{% for page in site.pages %}<url>
{% for page in site.pages %}{% unless page.hide_from_sitemap %}<url>
<loc>https://docs.docker.com{{ page.url }}</loc>
<lastmod>{% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}</lastmod>
</url>{% endfor %}
</url>{% endunless %}{% endfor %}
</urlset>