From b33e6bc25e8cd9d93b5f554279b7e24c691c830c Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 17 Mar 2025 08:32:30 -0400 Subject: [PATCH] Update to latest Hugo release --- .github/workflows/main.yml | 2 +- themes/red/layouts/_default/art-detail.html | 7 +++++-- themes/red/layouts/shortcodes/stoot.html | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c711fa..543059e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v3 with: - hugo-version: '0.140.2' + hugo-version: '0.145.0' extended: true - name: Build diff --git a/themes/red/layouts/_default/art-detail.html b/themes/red/layouts/_default/art-detail.html index 9d24740..537b869 100644 --- a/themes/red/layouts/_default/art-detail.html +++ b/themes/red/layouts/_default/art-detail.html @@ -100,9 +100,12 @@ {{ $full := printf "%s/thumb/%s.avif" $.Site.Params.image_host $filename_without_ext }} {{ $jpeg := printf "%s/thumb/%s.jpg" $.Site.Params.image_host $filename_without_ext }} + {{ $thumb_width := math.Div (int .Params.thumb_width) 2 }} + {{ $thumb_height := math.Div (int .Params.thumb_height) 2 }} + - - {{ $title }} + + {{ $title }} diff --git a/themes/red/layouts/shortcodes/stoot.html b/themes/red/layouts/shortcodes/stoot.html index 4bcc74c..7e52d1f 100644 --- a/themes/red/layouts/shortcodes/stoot.html +++ b/themes/red/layouts/shortcodes/stoot.html @@ -9,13 +9,13 @@ {{ $id := .Get 1 }} {{ $urlToGet := print "https://" $masIns "/api/v1/statuses/" $id }} -{{- with resources.GetRemote $urlToGet -}} - {{ if (resources.GetRemote $urlToGet).Err }} +{{- with try (resources.GetRemote $urlToGet) -}} + {{ with .Err }}
- {{ else }} + {{ else with .Value }} {{ $json := unmarshal .Content }} {{ $jsonHolder := $json }}{{/* Being safe */}}