Skip to content

Commit 03d60f9

Browse files
committed
Replace "hide_from_sitemap" with "sitemap: false"
The `hide_from_sitemap` metadata variable was a custom thing we implemented to add a "noindex" meta-header to pages and to exclude a page from the search auto-complete. However, pages with that option set would still be included in sitemap.xml, resulting in search engines to visit those pages (only to discover they should not index them). This patch replaces the custom `hide_from_sitemap` value for `sitemap: false`, which is a metadata variable that's defined by the "jekyll-sitemap" plugin we use to generate the sitemap.xml; https://github.com/jekyll/jekyll-sitemap/blob/v1.4.0/README.md#exclusions Setting this variable will now: - add a "noindex" metadata header to the page - exclude the page from the sitemap.xml. - exclude the page from /js/metadata.json (used for search autocomplete) Also fixed an issue in the metadata.json where the `notoc` metadata was used to exclude pages, however that variable is meant to disable the in-page TOC (right-hand side navigation with anchor links). Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 1c9b279 commit 03d60f9

File tree

202 files changed

+206
-204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+206
-204
lines changed

Diff for: 404.md

+1

Diff for: README.md

+2-1

Diff for: _config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ defaults:
9797
- scope:
9898
path: "datacenter"
9999
values:
100-
hide_from_sitemap: true
100+
sitemap: false
101101
title: Docker Enterprise moved to Mirantis
102102
- scope:
103103
path: "ee"
104104
values:
105-
hide_from_sitemap: true
105+
sitemap: false
106106
title: Docker Enterprise moved to Mirantis
107107

108108
# Assets

Diff for: _config_authoring.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ defaults:
9494
- scope:
9595
path: "datacenter"
9696
values:
97-
hide_from_sitemap: true
97+
sitemap: false
9898
title: Docker Enterprise moved to Mirantis
9999
- scope:
100100
path: "ee"
101101
values:
102-
hide_from_sitemap: true
102+
sitemap: false
103103
title: Docker Enterprise moved to Mirantis
104104

105105
# Assets

Diff for: _includes/head.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
{%- endif -%}
2727
<head>
2828
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
29-
{%- if site.google_analytics != '' -%}{%- include analytics/google_analytics.html GOOGLE_ID=site.google_analytics -%}{%- endif -%}
30-
{%- if page.hide_from_sitemap or site.GH_ENV == "gh_pages" %}
29+
{%- if page.sitemap == false or site.GH_ENV == "gh_pages" %}
3130
<meta name="robots" content="noindex"/>
3231
{%- endif %}
32+
{%- if site.google_analytics != '' -%}{%- include analytics/google_analytics.html GOOGLE_ID=site.google_analytics -%}{%- endif -%}
3333
<title>{{ page.title | default: page_title }} | Docker Documentation</title>
3434
<meta name="description" content="{{ page.description | default: page_description | escape}}" />
3535
<meta name="keywords" content="{{ page.keywords | default: 'docker, docker open source, docker platform, distributed applications, microservices, containers, docker containers, docker software, docker virtualization' }}">

Diff for: _samples/library/adminer.md

+1-1

Diff for: _samples/library/adoptopenjdk.md

+1-1

Diff for: _samples/library/aerospike.md

+1-1

Diff for: _samples/library/alpine.md

+1-1

Diff for: _samples/library/alt.md

+1-1

Diff for: _samples/library/amazoncorretto.md

+1-1

Diff for: _samples/library/amazonlinux.md

+1-1

Diff for: _samples/library/arangodb.md

+1-1

Diff for: _samples/library/backdrop.md

+1-1

Diff for: _samples/library/bash.md

+1-1

Diff for: _samples/library/bonita.md

+1-1

Diff for: _samples/library/buildpack-deps.md

+1-1

Diff for: _samples/library/busybox.md

+1-1

Diff for: _samples/library/cassandra.md

+1-1

Diff for: _samples/library/centos.md

+1-1

Diff for: _samples/library/chronograf.md

+1-1

Diff for: _samples/library/cirros.md

+1-1

Diff for: _samples/library/clearlinux.md

+1-1

Diff for: _samples/library/clefos.md

+1-1

Diff for: _samples/library/clojure.md

+1-1

Diff for: _samples/library/composer.md

+1-1

Diff for: _samples/library/consul.md

+1-1

Diff for: _samples/library/convertigo.md

+1-1

Diff for: _samples/library/couchbase.md

+1-1

Diff for: _samples/library/couchdb.md

+1-1

Diff for: _samples/library/crate.md

+1-1

Diff for: _samples/library/crux.md

+1-1

Diff for: _samples/library/debian.md

+1-1

Diff for: _samples/library/docker.md

+1-1

Diff for: _samples/library/drupal.md

+1-1

Diff for: _samples/library/eclipse-mosquitto.md

+1-1

Diff for: _samples/library/eggdrop.md

+1-1

Diff for: _samples/library/elasticsearch.md

+1-1

Diff for: _samples/library/elixir.md

+1-1

Diff for: _samples/library/erlang.md

+1-1

Diff for: _samples/library/euleros.md

+1-1

Diff for: _samples/library/express-gateway.md

+1-1

0 commit comments

Comments
 (0)