Skip to content

Commit 5580f5c

Browse files
authored
Merge pull request #31594 from chalin/chalin-outdated-blog-feat-2022-02-01
Mark blogs older than a year as outdated
2 parents 7acd9b3 + 1a88ffd commit 5580f5c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

data/i18n/en/en.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ other = "Objectives"
202202
[options_heading]
203203
other = "Options"
204204

205+
[outdated_blog__message]
206+
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."
207+
208+
[outdated_blog__title]
209+
other = "Outdated article"
210+
205211
[post_create_issue]
206212
other = "Create an issue"
207213

layouts/partials/deprecation-warning.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,11 @@ <h3>
99
</p>
1010
</div>
1111
</section>
12+
{{ else if and (eq .Section "blog") .Date (.Date.Before (now.AddDate -1 0 0)) -}}
13+
<section id="deprecation-warning" class="outdated-blog">
14+
<div class="content deprecation-warning pageinfo">
15+
<h3>{{ T "outdated_blog__title" }}</h3>
16+
<p>{{ T "outdated_blog__message" }}</p>
17+
</div>
18+
</section>
1219
{{ end }}

0 commit comments

Comments
 (0)