From 11ad351c53cbbf63fbf89882fa17a209e18035b7 Mon Sep 17 00:00:00 2001 From: Dipesh Rawat Date: Thu, 31 Aug 2023 23:56:07 +0100 Subject: [PATCH] Add layout to hide outdated releases --- content/en/releases/_index.md | 2 ++ data/i18n/en/en.toml | 2 +- layouts/docs/release-info.html | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 layouts/docs/release-info.html diff --git a/content/en/releases/_index.md b/content/en/releases/_index.md index 5b62f95d82add..97d9004313158 100644 --- a/content/en/releases/_index.md +++ b/content/en/releases/_index.md @@ -2,6 +2,8 @@ linktitle: Release History title: Releases type: docs +layout: release-info +notoc: true --- diff --git a/data/i18n/en/en.toml b/data/i18n/en/en.toml index 65080230828e3..8ec60129fa5a6 100644 --- a/data/i18n/en/en.toml +++ b/data/i18n/en/en.toml @@ -65,7 +65,7 @@ other = "(last updated: %s)" other = "You are viewing documentation for Kubernetes version:" [deprecation_warning] -other = " documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date documentation, see the " +other = " documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date information, see the " [deprecation_file_warning] other = "Deprecated" diff --git a/layouts/docs/release-info.html b/layouts/docs/release-info.html new file mode 100644 index 0000000000000..bdb06233b313d --- /dev/null +++ b/layouts/docs/release-info.html @@ -0,0 +1,15 @@ +{{ define "main" }} +{{ if not .Site.Params.deprecated }} + {{ .Content }} +{{ else }} +
+ {{ range where .Site.Pages "Section" "releases" }} + {{ if not .IsNode }} +
+
{{ .Title }}
+
+ {{ end }} + {{ end }} +
+{{ end }} +{{ end }} \ No newline at end of file