From 2c989915a1e6a25cc0c5164d557ea0bd4aa48928 Mon Sep 17 00:00:00 2001 From: Jack Hickey <133868041+nginx-jack@users.noreply.github.com> Date: Wed, 25 Jun 2025 10:09:03 +0100 Subject: [PATCH] Ghcode: Fix rendering in latest version of hugo New try syntax requires use of `else with .Value` before contents of resource can be used. See https://gohugo.io/functions/resources/getremote/ --- layouts/shortcodes/ghcode.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/shortcodes/ghcode.html b/layouts/shortcodes/ghcode.html index 8bac9d0..b3ff23b 100644 --- a/layouts/shortcodes/ghcode.html +++ b/layouts/shortcodes/ghcode.html @@ -4,12 +4,12 @@ {{ with try (resources.GetRemote $file) }} {{ with .Err }} {{ errorf "%s" . }} - {{ else }} + {{ else with .Value }} {{ $lang := path.Ext $file | strings.TrimPrefix "." }}