Skip to content
Closed
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
8 changes: 4 additions & 4 deletions layouts/_default/cve-feed.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{- $url := .Site.Params.cveFeedBucket -}}
{{- with resources.GetRemote $url -}}
{{- if .Err -}}
{{- $message := printf "Failed to retrieve CVE data: %s" .Err -}}
{{- with try (resources.GetRemote $url) -}}
{{- with .Err -}}
{{- $message := printf "Failed to retrieve CVE data: %s" . -}}
{{- if eq hugo.Environment "production" -}}
{{- errorf $message -}}
{{- else -}}
{{- warnf $message -}}
{{- end -}}
{{- else -}}
{{- else with .Value -}}
{{- .Content | transform.Unmarshal | jsonify -}}
{{- end -}}
{{- else -}}
Expand Down
8 changes: 4 additions & 4 deletions layouts/_default/cve-feed.rss.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{- $url := .Site.Params.cveFeedBucket -}}
{{- $feed := "" -}}

{{- with resources.GetRemote $url -}}
{{- if .Err -}}
{{- $message := printf "Failed to retrieve CVE data: %s" .Err -}}
{{- with try (resources.GetRemote $url) -}}
{{- with .Err -}}
{{- $message := printf "Failed to retrieve CVE data: %s" . -}}
{{- if eq hugo.Environment "production" -}}
{{- errorf $message -}}
{{- else -}}
{{- warnf $message -}}
{{- end -}}
{{- else -}}
{{- else with .Value -}}
{{- $feed = .Content | transform.Unmarshal -}}
{{- end -}}
{{- else -}}
Expand Down
8 changes: 4 additions & 4 deletions layouts/shortcodes/cve-feed.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{{- $url := .Site.Params.cveFeedBucket }}
{{- $feed := "" -}}
<!-- Try to fetch remote resource from the specified URL -->
{{- with resources.GetRemote $url -}}
{{- if .Err -}}
{{- with try (resources.GetRemote $url) -}}
{{- with .Err -}}
<!-- Error message if retrieval fails -->
{{- $message := printf "Failed to retrieve CVE data: %s" .Err -}}
{{- $message := printf "Failed to retrieve CVE data: %s" . -}}
{{- if eq hugo.Environment "production" -}}
{{- errorf $message -}}
{{- else -}}
{{- warnf $message -}}
{{- end -}}
{{- else -}}
{{- else with .Value -}}
<!-- Process the content if retrieval is successful -->
{{- $feed = .Content | transform.Unmarshal -}}
{{- if ne $feed.version "https://jsonfeed.org/version/1.1" -}}
Expand Down
8 changes: 4 additions & 4 deletions layouts/shortcodes/release-binaries.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{{- $url := "https://raw.githubusercontent.com/kubernetes-sigs/downloadkubernetes/master/dist/release_binaries.json" }}
{{- $response := "" }}

{{- with resources.GetRemote $url -}}
{{- if .Err -}}
{{- $message := printf "Failed to retrieve release binaries data: %s" .Err -}}
{{- with try (resources.GetRemote $url) -}}
{{- with .Err -}}
{{- $message := printf "Failed to retrieve release binaries data: %s" . -}}
{{- if eq hugo.Environment "production" -}}
{{- errorf $message -}}
{{- else -}}
{{- warnf $message -}}
{{- end -}}
{{- else -}}
{{- else with .Value -}}
{{- $response = .Content | transform.Unmarshal }}
{{- end -}}
{{- else -}}
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ command = "git submodule update --init --recursive --depth 1 && make non-product

[build.environment]
NODE_VERSION = "20.17.0"
HUGO_VERSION = "0.133.0"
HUGO_VERSION = "0.147.0"

[context.deploy-preview]
command = "git submodule update --init --recursive --depth 1 && make deploy-preview && npx -y pagefind --site public"
Expand Down