Skip to content

Commit e9bad2e

Browse files
committed
Backport cve-feed shortcode
1 parent d798a9b commit e9bad2e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

layouts/shortcodes/cve-feed.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1+
{{ $feed := getJSON .Site.Params.cveFeedBucket }}
2+
{{ if ne $feed.version "https://jsonfeed.org/version/1.1" }}
3+
{{ errorf "Build Failed. CVE feed does not comply with JSON feed v1.1" }}
4+
{{ end }}
15
<table class="security-cves">
2-
<caption>{{ T "cve_table" }}</caption>
6+
<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>
37
<thead>
48
<tr>
59
<th>{{ T "cve_id" }}</th>
6-
<th>{{ T "cve_summary"}}</th>
10+
<th>{{ T "cve_summary" }}</th>
711
<th>{{ T "cve_issue_url" }}</th>
812
</tr>
913
</thead>
1014
<tbody>
11-
{{ range $issues := getJSON .Site.Params.cveFeedBucket }}
15+
{{ range $feed.items }}
1216
<tr>
13-
<td><a href="{{ .cve_url }}">{{ .cve_id | htmlEscape | safeHTML }}</a></td>
17+
<td><a href="{{ .url }}">{{ .id | htmlEscape | safeHTML }}</a></td>
1418
<td>{{ .summary | htmlEscape | safeHTML }}</td>
15-
<td><a href="{{ .issue_url }}">#{{ .number }}</a></td>
19+
<td><a href="{{ .url }}">#{{ ._kubernetes_io.issue_number }}</a></td>
1620
</tr>
1721
{{ end }}
1822
</tbody>
19-
</table>
23+
</table>

0 commit comments

Comments
 (0)