Add layout to hide outdated releases

This commit is contained in:
Dipesh Rawat 2023-08-31 23:56:07 +01:00
parent 60638ee356
commit 11ad351c53
No known key found for this signature in database
3 changed files with 18 additions and 1 deletions

View File

@ -2,6 +2,8 @@
linktitle: Release History
title: Releases
type: docs
layout: release-info
notoc: true
---

View File

@ -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"

View File

@ -0,0 +1,15 @@
{{ define "main" }}
{{ if not .Site.Params.deprecated }}
{{ .Content }}
{{ else }}
<div class="section-index">
{{ range where .Site.Pages "Section" "releases" }}
{{ if not .IsNode }}
<div class="entry">
<h5><a href="{{ .RelPermalink }}">{{ .Title }}</a></h5>
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}