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

CVE feed cleanup on i18n data and shortcode compliance check #39727

Merged
merged 2 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 2 additions & 5 deletions data/i18n/en/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,11 @@ other = "Issue Summary"
[cve_table]
other = "Official Kubernetes CVE List"

[cve_table_date_before]
other = "(last updated: "

[cve_table_date_format]
other = "02 Jan 2006 15:04:05 MST"

[cve_table_date_after]
other = ")"
[cve_table_date_format_string]
other = "(last updated: %s)"

[deprecation_title]
other = "You are viewing documentation for Kubernetes version:"
Expand Down
4 changes: 2 additions & 2 deletions layouts/shortcodes/cve-feed.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{ $feed := getJSON .Site.Params.cveFeedBucket }}
{{ if ne $feed.version "https://jsonfeed.org/version/1.1" }}
{{ errorf "Build Failed. CVE feed does not comply with JSON feed v1.1" }}
{{ warnf "CVE feed shortcode. KEP-3203: CVE feed does not comply with JSON feed v1.1." }}
{{ end }}
<table class="security-cves">
<caption style="caption-side: top;">{{ T "cve_table" }} {{ T "cve_table_date_before" }}{{ $feed._kubernetes_io.updated_at | time.Format ( T "cve_table_date_format" ) }}{{ T "cve_table_date_after" }}</caption>
<caption style="caption-side: top;">{{ T "cve_table" }} {{ printf (T "cve_table_date_format_string") ($feed._kubernetes_io.updated_at | time.Format (T "cve_table_date_format")) }}</caption>
<thead>
<tr>
<th>{{ T "cve_id" }}</th>
Expand Down