Skip to content

Commit

Permalink
Replace "hide_from_sitemap" with "sitemap: false"
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
thaJeztah committed Oct 21, 2020
1 parent 1c9b279 commit 03d60f9
Show file tree
Hide file tree
Showing 202 changed files with 206 additions and 204 deletions.
1 change: 1 addition & 0 deletions 404.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Sorry, we can't find that page"
permalink: /404.html
noratings: true
notoc: true
sitemap: false
skip_read_time: true
---

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ following keys are supported. The title, description, and keywords are required.
| toc_max | no | Ignored if `notoc` is set to `false`. The maximum heading level included in the in-page TOC. Defaults to `3`, to show `<h3>` headings. Set to the same as `toc_min` to only show `toc_min` level of headings. |
| tree | no | Either `true` or `false`. Set to `false` to disable the left-hand site-wide navigation for this page. Appropriate for some pages like the search page or the 404 page. |
| no_ratings | no | Either `true` or `false`. Set to `true` to disable the page-ratings applet for this page. Defaults to `false`. |
| skip_read_time | no | Set to `true` to disable the 'Estimated reading time' banner for this page. |
| skip_read_time | no | Set to `true` to disable the 'Estimated reading time' banner for this page. |
| sitemap | no | Exclude the page from indexing by search engines. When set to `false`, the page is excluded from `sitemap.xml`, and a `<meta name="robots" content="noindex"/>` header is added to the page. |
The following is an example of valid (but contrived) page metadata. The order of
the metadata elements in the front-matter is not important.
Expand Down
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ defaults:
- scope:
path: "datacenter"
values:
hide_from_sitemap: true
sitemap: false
title: Docker Enterprise moved to Mirantis
- scope:
path: "ee"
values:
hide_from_sitemap: true
sitemap: false
title: Docker Enterprise moved to Mirantis

# Assets
Expand Down
4 changes: 2 additions & 2 deletions _config_authoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ defaults:
- scope:
path: "datacenter"
values:
hide_from_sitemap: true
sitemap: false
title: Docker Enterprise moved to Mirantis
- scope:
path: "ee"
values:
hide_from_sitemap: true
sitemap: false
title: Docker Enterprise moved to Mirantis

# Assets
Expand Down
4 changes: 2 additions & 2 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
{%- endif -%}
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{%- if site.google_analytics != '' -%}{%- include analytics/google_analytics.html GOOGLE_ID=site.google_analytics -%}{%- endif -%}
{%- if page.hide_from_sitemap or site.GH_ENV == "gh_pages" %}
{%- if page.sitemap == false or site.GH_ENV == "gh_pages" %}
<meta name="robots" content="noindex"/>
{%- endif %}
{%- if site.google_analytics != '' -%}{%- include analytics/google_analytics.html GOOGLE_ID=site.google_analytics -%}{%- endif -%}
<title>{{ page.title | default: page_title }} | Docker Documentation</title>
<meta name="description" content="{{ page.description | default: page_description | escape}}" />
<meta name="keywords" content="{{ page.keywords | default: 'docker, docker open source, docker platform, distributed applications, microservices, containers, docker containers, docker software, docker virtualization' }}">
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/adminer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, adminer
repo: adminer
layout: docs
permalink: /samples/library/adminer/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/adminer/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/adoptopenjdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, adoptopenjdk
repo: adoptopenjdk
layout: docs
permalink: /samples/library/adoptopenjdk/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/adoptopenjdk/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/aerospike.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, aerospike
repo: aerospike
layout: docs
permalink: /samples/library/aerospike/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/aerospike/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, alpine
repo: alpine
layout: docs
permalink: /samples/library/alpine/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/alpine/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/alt.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, alt
repo: alt
layout: docs
permalink: /samples/library/alt/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/alt/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/amazoncorretto.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, amazoncorretto
repo: amazoncorretto
layout: docs
permalink: /samples/library/amazoncorretto/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/amazoncorretto/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/amazonlinux.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, amazonlinux
repo: amazonlinux
layout: docs
permalink: /samples/library/amazonlinux/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/amazonlinux/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/arangodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, arangodb
repo: arangodb
layout: docs
permalink: /samples/library/arangodb/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/arangodb/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/backdrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, backdrop
repo: backdrop
layout: docs
permalink: /samples/library/backdrop/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/backdrop/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, bash
repo: bash
layout: docs
permalink: /samples/library/bash/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/bash/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/bonita.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, bonita
repo: bonita
layout: docs
permalink: /samples/library/bonita/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/bonita/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/buildpack-deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, buildpack-deps
repo: buildpack-deps
layout: docs
permalink: /samples/library/buildpack-deps/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/buildpack-deps/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/busybox.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, busybox
repo: busybox
layout: docs
permalink: /samples/library/busybox/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/busybox/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/cassandra.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, cassandra
repo: cassandra
layout: docs
permalink: /samples/library/cassandra/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/cassandra/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/centos.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, centos
repo: centos
layout: docs
permalink: /samples/library/centos/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/centos/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/chronograf.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, chronograf
repo: chronograf
layout: docs
permalink: /samples/library/chronograf/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/chronograf/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/cirros.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, cirros
repo: cirros
layout: docs
permalink: /samples/library/cirros/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/cirros/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/clearlinux.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, clearlinux
repo: clearlinux
layout: docs
permalink: /samples/library/clearlinux/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/clearlinux/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/clefos.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, clefos
repo: clefos
layout: docs
permalink: /samples/library/clefos/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/clefos/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/clojure.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, clojure
repo: clojure
layout: docs
permalink: /samples/library/clojure/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/clojure/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, composer
repo: composer
layout: docs
permalink: /samples/library/composer/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/composer/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/consul.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, consul
repo: consul
layout: docs
permalink: /samples/library/consul/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/consul/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/convertigo.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, convertigo
repo: convertigo
layout: docs
permalink: /samples/library/convertigo/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/convertigo/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/couchbase.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, couchbase
repo: couchbase
layout: docs
permalink: /samples/library/couchbase/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/couchbase/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/couchdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, couchdb
repo: couchdb
layout: docs
permalink: /samples/library/couchdb/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/couchdb/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/crate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, crate
repo: crate
layout: docs
permalink: /samples/library/crate/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/crate/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/crux.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, crux
repo: crux
layout: docs
permalink: /samples/library/crux/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/crux/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, debian
repo: debian
layout: docs
permalink: /samples/library/debian/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/debian/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, docker
repo: docker
layout: docs
permalink: /samples/library/docker/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/docker/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/drupal.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, drupal
repo: drupal
layout: docs
permalink: /samples/library/drupal/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/drupal/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/eclipse-mosquitto.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, eclipse-mosquitto
repo: eclipse-mosquitto
layout: docs
permalink: /samples/library/eclipse-mosquitto/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/eclipse-mosquitto/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/eggdrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, eggdrop
repo: eggdrop
layout: docs
permalink: /samples/library/eggdrop/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/eggdrop/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, elasticsearch
repo: elasticsearch
layout: docs
permalink: /samples/library/elasticsearch/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/elasticsearch/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/elixir.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, elixir
repo: elixir
layout: docs
permalink: /samples/library/elixir/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/elixir/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/erlang.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, erlang
repo: erlang
layout: docs
permalink: /samples/library/erlang/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/erlang/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/euleros.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, euleros
repo: euleros
layout: docs
permalink: /samples/library/euleros/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/euleros/
description: |
Expand Down
2 changes: 1 addition & 1 deletion _samples/library/express-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: library, sample, express-gateway
repo: express-gateway
layout: docs
permalink: /samples/library/express-gateway/
hide_from_sitemap: true
sitemap: false
redirect_from:
- /samples/express-gateway/
description: |
Expand Down
Loading

0 comments on commit 03d60f9

Please sign in to comment.