File tree 5 files changed +13
-13
lines changed
5 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
1
{{- $url := .Site.Params.cveFeedBucket - }}
2
- {{- with resources.GetRemote $url - }}
3
- {{- if .Err - }}
2
+ {{- with try ( resources.GetRemote $url) - }}
3
+ {{- with .Err - }}
4
4
{{- $message := printf "Failed to retrieve CVE data: %s" .Err - }}
5
5
{{- if eq hugo.Environment "production" - }}
6
6
{{- errorf $message - }}
7
7
{{- else - }}
8
8
{{- warnf $message - }}
9
9
{{- end - }}
10
10
{{- else - }}
11
- {{- .Content | transform.Unmarshal | jsonify - }}
11
+ {{- .Value | transform.Unmarshal | jsonify - }}
12
12
{{- end - }}
13
13
{{- else - }}
14
14
{{- $message := printf "Unable to fetch CVE data from the specified URL: %q" $url - }}
Original file line number Diff line number Diff line change 1
1
{{- $url := .Site.Params.cveFeedBucket -}}
2
2
{{- $feed := "" -}}
3
3
4
- {{- with resources.GetRemote $url -}}
5
- {{- if .Err -}}
4
+ {{- with try ( resources.GetRemote $url) -}}
5
+ {{- with .Err -}}
6
6
{{- $message := printf "Failed to retrieve CVE data: %s" .Err -}}
7
7
{{- if eq hugo.Environment "production" -}}
8
8
{{- errorf $message -}}
9
9
{{- else -}}
10
10
{{- warnf $message -}}
11
11
{{- end -}}
12
12
{{- else -}}
13
- {{- $feed = .Content | transform.Unmarshal -}}
13
+ {{- $feed = .Value | transform.Unmarshal -}}
14
14
{{- end -}}
15
15
{{- else -}}
16
16
{{- $message := printf "Unable to fetch CVE data from the specified URL: %q" $url -}}
Original file line number Diff line number Diff line change 1
1
{{- $url := .Site.Params.cveFeedBucket }}
2
2
{{- $feed := "" -}}
3
3
<!-- Try to fetch remote resource from the specified URL -->
4
- {{- with resources.GetRemote $url -}}
5
- {{- if .Err -}}
4
+ {{- with try ( resources.GetRemote $url) -}}
5
+ {{- with .Err -}}
6
6
<!-- Error message if retrieval fails -->
7
7
{{- $message := printf "Failed to retrieve CVE data: %s" .Err -}}
8
8
{{- if eq hugo.Environment "production" -}}
12
12
{{- end -}}
13
13
{{- else -}}
14
14
<!-- Process the content if retrieval is successful -->
15
- {{- $feed = .Content | transform.Unmarshal -}}
15
+ {{- $feed = .Value | transform.Unmarshal -}}
16
16
{{- if ne $feed.version "https://jsonfeed.org/version/1.1" -}}
17
17
{{- $warningMessage := "CVE feed shortcode. KEP-3203: CVE feed does not comply with JSON feed v1.1." -}}
18
18
{{- if eq hugo.Environment "production" -}}
Original file line number Diff line number Diff line change 2
2
{{- $url := "https://raw.githubusercontent.com/kubernetes-sigs/downloadkubernetes/master/dist/release_binaries.json" }}
3
3
{{- $response := "" }}
4
4
5
- {{- with resources.GetRemote $url -}}
6
- {{- if .Err -}}
5
+ {{- with try ( resources.GetRemote $url) -}}
6
+ {{- with .Err -}}
7
7
{{- $message := printf "Failed to retrieve release binaries data: %s" .Err -}}
8
8
{{- if eq hugo.Environment "production" -}}
9
9
{{- errorf $message -}}
10
10
{{- else -}}
11
11
{{- warnf $message -}}
12
12
{{- end -}}
13
13
{{- else -}}
14
- {{- $response = .Content | transform.Unmarshal }}
14
+ {{- $response = .Value | transform.Unmarshal }}
15
15
{{- end -}}
16
16
{{- else -}}
17
17
{{ $message := printf "Unable to fetch release binaries data from the specified URL: %q" $url -}}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ command = "git submodule update --init --recursive --depth 1 && make non-product
8
8
9
9
[build .environment ]
10
10
NODE_VERSION = " 20.17.0"
11
- HUGO_VERSION = " 0.133 .0"
11
+ HUGO_VERSION = " 0.145 .0"
12
12
13
13
[context .deploy-preview ]
14
14
command = " git submodule update --init --recursive --depth 1 && make deploy-preview && npx -y pagefind --site public"
You can’t perform that action at this time.
0 commit comments