website/layouts/shortcodes/cve-feed.html

24 lines
854 B
HTML

{{ $feed := getJSON .Site.Params.cveFeedBucket }}
{{ if ne $feed.version "https://jsonfeed.org/version/1.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" }} {{ 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>
<th>{{ T "cve_summary" }}</th>
<th>{{ T "cve_issue_url" }}</th>
</tr>
</thead>
<tbody>
{{ range $feed.items }}
<tr>
<td><a href="{{ .url }}">{{ .id | htmlEscape | safeHTML }}</a></td>
<td>{{ .summary | htmlEscape | safeHTML }}</td>
<td><a href="{{ .url }}">#{{ ._kubernetes_io.issue_number }}</a></td>
</tr>
{{ end }}
</tbody>
</table>