Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark blogs older than a year as outdated #31594

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_over_one_year_old]
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
9 changes: 9 additions & 0 deletions layouts/partials/deprecation-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,13 @@ <h3>
</p>
</div>
</section>
{{ else if and (eq .Section "blog") .Date (.Date.Before (now.AddDate -1 0 0)) -}}
{{ $title := .Param "outdated_blog.title" | default (T "outdated_blog_title") -}}
{{ $msg := .Param "outdated_blog.message" | default (T "outdated_blog_over_one_year_old") -}}
Copy link
Contributor Author

@chalin chalin Feb 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that I'll pull out the .Param "outdated_blog.* parts, since it isn't fully functional (at least not as I envision it) and it isn't needed for marking blogs that are a year or older. (I'll do that tomorrow.)

<section id="deprecation-warning" class="blog-outdated-warning">
<div class="content deprecation-warning pageinfo">
<h3>{{ $title }}</h3>
<p>{{ $msg }}</p>
</div>
</section>
{{ end }}