Skip to content

Commit

Permalink
Merge pull request #31594 from chalin/chalin-outdated-blog-feat-2022-…
Browse files Browse the repository at this point in the history
…02-01

Mark blogs older than a year as outdated
  • Loading branch information
k8s-ci-robot authored Feb 2, 2022
2 parents 7acd9b3 + 1a88ffd commit 5580f5c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data/i18n/en/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ other = "Objectives"
[options_heading]
other = "Options"

[outdated_blog__message]
other = "The Kubernetes project considers this article to be outdated because it is more than one year old. Check that the information in the page has not become incorrect since its publication."

[outdated_blog__title]
other = "Outdated article"

[post_create_issue]
other = "Create an issue"

Expand Down
7 changes: 7 additions & 0 deletions layouts/partials/deprecation-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ <h3>
</p>
</div>
</section>
{{ else if and (eq .Section "blog") .Date (.Date.Before (now.AddDate -1 0 0)) -}}
<section id="deprecation-warning" class="outdated-blog">
<div class="content deprecation-warning pageinfo">
<h3>{{ T "outdated_blog__title" }}</h3>
<p>{{ T "outdated_blog__message" }}</p>
</div>
</section>
{{ end }}

0 comments on commit 5580f5c

Please sign in to comment.