File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 20
20
{{- warnf $message -}}
21
21
{{- end -}}
22
22
{{- end -}}
23
+ <!-- Render last build date only if CVE feed is available, accommodating for offline builds. -->
24
+ {{- if and (ne $feed nil) (ne (printf "%T" $feed) "string") -}}
23
25
<rss version =" 2.0" xmlns : atom =" http://www.w3.org/2005/Atom" >
24
26
<channel >
25
27
<title >{{ $feed.title }}</title >
28
30
<generator >Hugo -- gohugo.io</generator >
29
31
<language >en-US</language >
30
32
<copyright >{{ .Site.Params.Copyright_k8s }}</copyright >
31
- <!-- Render last build date only if CVE feed is available, accommodating for offline builds. -->
32
- {{- if ne $feed nil -}}
33
33
<lastBuildDate >{{ time.Format "Mon, 02 Jan 2006 15:04:05 -0700" $feed._kubernetes_io.updated_at | safeHTML }}</lastBuildDate >
34
- {{- end -}}
35
34
{{ with .OutputFormats.Get "RSS" -}}
36
35
{{ printf "<atom : link href =%q rel =\" self\" type =%q />" .Permalink .MediaType | safeHTML }}
37
36
{{ end -}}
47
46
{{ end -}}
48
47
</channel >
49
48
</rss >
50
-
49
+ {{- end -}}
Original file line number Diff line number Diff line change 33
33
{{- end -}}
34
34
35
35
<!-- Render table only if CVE feed is available, accommodating for offline builds. -->
36
- {{ if ne $feed nil }}
36
+ {{ if and ( ne $feed nil) (ne (printf "%T" $feed) "string") }}
37
37
< table class ="security-cves ">
38
38
< 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 >
39
39
< thead >
Original file line number Diff line number Diff line change 23
23
{{- end -}}
24
24
25
25
<!-- Continue processing only if release binaries JSON is available, accommodating for offline builds. -->
26
- {{ if ne $response nil }}
26
+ {{ if and ( ne $response nil) ((ne (printf "%T" $response) "string")) }}
27
27
{{ $currentVersion := site.Params.version }}
28
28
29
29
{{ $Binaries := slice }}
151
151
</ table >
152
152
</ div >
153
153
</ div >
154
- {{- end -}}
154
+ {{- end -}}
You can’t perform that action at this time.
0 commit comments