From 34693b50c92b326a7b5c331558258249054b09d6 Mon Sep 17 00:00:00 2001 From: William Martin Stewart Date: Fri, 11 Aug 2017 08:07:00 +0200 Subject: [PATCH] Add deprecated docs warning mechanism (#4731) * Deprecated docs warning * Unknown tag 'endcomment' * only add css when necessary * try lighter bgcolor * tweak copy * change development url to point at vnext-staging * try callout * rollback * change var names * update var used * fix var typo * turn off deprecation message --- _config.yml | 3 +++ _includes/deprecation-warning.html | 12 ++++++++++++ _includes/head.html | 1 + _layouts/docwithnav.html | 2 ++ css/deprecation-warning.css | 6 ++++++ index.html | 2 ++ 6 files changed, 26 insertions(+) create mode 100644 _includes/deprecation-warning.html create mode 100644 css/deprecation-warning.css diff --git a/_config.yml b/_config.yml index 86f961e2a5..5f123c183e 100644 --- a/_config.yml +++ b/_config.yml @@ -43,6 +43,9 @@ defaults: githubbranch: "v1.4.12" docsbranch: "release-1.4" url: https://v1-4.docs.kubernetes.io/docs/ + deprecated: false + currentUrl: https://kubernetes.io/docs/home/ + nextUrl: http://kubernetes-io-vnext-staging.netlify.com/ - scope: path: "docs" diff --git a/_includes/deprecation-warning.html b/_includes/deprecation-warning.html new file mode 100644 index 0000000000..39e9ff6289 --- /dev/null +++ b/_includes/deprecation-warning.html @@ -0,0 +1,12 @@ +{% if page.deprecated %} +
+
+
+

+ Documentation for Kubernetes {{ page.version}} is no longer actively maintained. The version you are currently viewing is a static snapshot. + For up-to-date documentation, see the latest version. +

+
+
+
+{% endif %} diff --git a/_includes/head.html b/_includes/head.html index 0410510070..e20aad91d2 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -8,6 +8,7 @@ + {% if page.deprecated %}{% endif %} {% if page.class == "gridPage" %}{% endif %} {% if page.css %}{% else %}{% endif %} diff --git a/_layouts/docwithnav.html b/_layouts/docwithnav.html index b7da71eb57..b57af76f74 100755 --- a/_layouts/docwithnav.html +++ b/_layouts/docwithnav.html @@ -35,6 +35,8 @@ +{% include deprecation-warning.html %} +
diff --git a/css/deprecation-warning.css b/css/deprecation-warning.css new file mode 100644 index 0000000000..f7afeffe52 --- /dev/null +++ b/css/deprecation-warning.css @@ -0,0 +1,6 @@ +.deprecation-warning { + padding: 20px; + margin: 20px 0; + border-radius: 3px; + background-color: #eeeeee; +} diff --git a/index.html b/index.html index b8c0289fa8..12c614aec5 100644 --- a/index.html +++ b/index.html @@ -21,6 +21,8 @@ cid: home
+{% include deprecation-warning.html %} +