From fd975899a6593cf0cf6df145b9ed29a4533bc85a Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Thu, 10 Aug 2017 22:20:59 -0700 Subject: [PATCH] Add deprecation warning to release-1.4 (#4756) * Add Version Selector to v1.4 * upgrade to newer header * change include_cached to include * move head.html to correct location * remove seo * add footer-scripts.html * turn on global nav * fix docs nav link * Add deprecation warning to release-1.4 * remove warning from index.html * add newlines --- _config.yml | 3 +++ _includes/deprecation-warning.html | 12 ++++++++++++ _includes/head.html | 1 + _layouts/docwithnav.html | 2 ++ css/deprecation-warning.css | 6 ++++++ 5 files changed, 24 insertions(+) create mode 100644 _includes/deprecation-warning.html create mode 100644 css/deprecation-warning.css diff --git a/_config.yml b/_config.yml index 493b7e8bf9..660d8a13ee 100644 --- a/_config.yml +++ b/_config.yml @@ -40,6 +40,9 @@ defaults: githubbranch: "v1.4.12" docsbranch: "release-1.4" url: https://v1-4.docs.kubernetes.io/docs/ + deprecated: true + 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 d8ef6b314d..16a162078c 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -7,6 +7,7 @@ + {% if page.deprecated %}{% endif %} {% if page.class == "gridPage" %}{% endif %} diff --git a/_layouts/docwithnav.html b/_layouts/docwithnav.html index 75ceb1976e..8df0e4fe72 100755 --- a/_layouts/docwithnav.html +++ b/_layouts/docwithnav.html @@ -38,6 +38,8 @@ +{% include deprecation-warning.html %} +
diff --git a/css/deprecation-warning.css b/css/deprecation-warning.css new file mode 100644 index 0000000000..d698a2e7a9 --- /dev/null +++ b/css/deprecation-warning.css @@ -0,0 +1,6 @@ +.deprecation-warning { + padding: 20px; + margin: 20px 0; + border-radius: 3px; + background-color: #eeeeee; +}