From 1862d54d71fabe9198d6df4c13261728ef29d767 Mon Sep 17 00:00:00 2001 From: Christian Mahnke Date: Sat, 18 Jan 2025 08:37:56 +0100 Subject: [PATCH] Fix for Hugo 0.141.0 --- layouts/shortcodes/site-generator.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/site-generator.html b/layouts/shortcodes/site-generator.html index 767364e8157..31555326673 100644 --- a/layouts/shortcodes/site-generator.html +++ b/layouts/shortcodes/site-generator.html @@ -10,11 +10,11 @@ {{- $version := "" }} {{- $opts := dict "headers" (dict "User-Agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36") }} -{{- with resources.GetRemote $url $opts}} +{{- with try (resources.GetRemote $url $opts) -}} {{- with .Err }} {{- $description = printf "Unable to reach %s, skipping!" $url -}} {{- warnf $description }} - {{- else }} + {{- else with .Value -}} {{- with findRE $patternVersion .Content }} {{- with index . 0 }}