diff --git a/_config.yml b/_config.yml index b9ec22c145..b24657cd8d 100644 --- a/_config.yml +++ b/_config.yml @@ -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 diff --git a/_includes/noindex.html b/_includes/noindex.html new file mode 100644 index 0000000000..f5105bd8c7 --- /dev/null +++ b/_includes/noindex.html @@ -0,0 +1 @@ + diff --git a/_layouts/docs.html b/_layouts/docs.html index b48a045d07..972f1ade70 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -75,6 +75,7 @@ ng\:form { {% seo %} +{% if page.hide_from_sitemap %}{% endif %}
diff --git a/robots.txt b/robots.txt index 1944517166..3762713552 100644 --- a/robots.txt +++ b/robots.txt @@ -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 diff --git a/sitemap.xml b/sitemap.xml index 901d119011..251906217a 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -12,8 +12,8 @@ layout: null https://docs.docker.com/ {{ site.time | date_to_xmlschema }} -{% for page in site.pages %} +{% for page in site.pages %}{% unless page.hide_from_sitemap %} https://docs.docker.com{{ page.url }} {% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %} -{% endfor %} +{% endunless %}{% endfor %}