21305: Add meta robots noindex when current doesn't match latest
authorPeter Amstutz <peter.amstutz@curii.com>
Thu, 21 Dec 2023 14:18:04 +0000 (09:18 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Thu, 21 Dec 2023 14:18:04 +0000 (09:18 -0500)
The goal is to get Google to only display results for the current
version of the documentation pages.

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

doc/_config.yml
doc/_layouts/default.html.liquid

index 96e46cda2218e856c6dd330f21fc62cbdd46863e..2422a2248c56f11a6035a4bfd416f8d4f16e6732 100644 (file)
@@ -11,6 +11,7 @@
 baseurl:
 current_version:
 all_versions:
+latest_version:
 arvados_api_host: localhost
 arvados_cluster_uuid: local
 arvados_workbench_host: http://localhost
index f07f33054493306690343ff6a3417a4f749bbbcb..7beb1cedbf27ad3b8f1fd873933667d46093fc10 100644 (file)
@@ -10,8 +10,11 @@ SPDX-License-Identifier: CC-BY-SA-3.0
     <meta charset="utf-8">
     <title>{% unless page.title == "Arvados | Documentation" %} Arvados {% if page.navmenu %}| {{ page.navmenu }} {% endif %} | {% endunless %}{{ page.title }}</title>
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="description" content="">
-    <meta name="author" content="">
+    <meta name="description" content="Arvados documentation site">
+    <meta name="author" content="Arvados authors">
+    {% if site.current_version != site.latest_version %}
+    <meta name="robots" content="noindex">
+    {% endif %}
     <link rel="icon" href="{{ site.baseurl }}/images/favicon.ico" type="image/x-icon">
     <link rel="shortcut icon" href="{{ site.baseurl }}/images/favicon.ico" type="image/x-icon">
     <link href="{{ site.baseurl }}/css/bootstrap.css" rel="stylesheet">