Skip to content

Commit

Permalink
Add layout to hide outdated releases
Browse files Browse the repository at this point in the history
  • Loading branch information
dipesh-rawat committed Sep 2, 2023
1 parent 60638ee commit 11ad351
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions content/en/releases/_index.md
Expand Up @@ -2,6 +2,8 @@
linktitle: Release History
title: Releases
type: docs
layout: release-info
notoc: true
---


Expand Down
2 changes: 1 addition & 1 deletion data/i18n/en/en.toml
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions layouts/docs/release-info.html
@@ -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 }}

0 comments on commit 11ad351

Please sign in to comment.