From e75c8cf40f0773ba49543ae73e2bc9377a6902fa Mon Sep 17 00:00:00 2001
From: Mark Dumay <61946753+markdumay@users.noreply.github.com>
Date: Sat, 18 Jan 2025 15:33:38 +0100
Subject: [PATCH] Upgrade to hugo v0.141.0
---
config/_default/hugo.toml | 2 +-
go.mod | 2 +-
go.sum | 2 ++
layouts/_default/_markup/render-codeblock-math.html | 4 ++--
layouts/_default/_markup/render-passthrough.html | 4 ++--
layouts/partials/assets/video.html | 8 ++++----
package-lock.json | 9 +++++----
package.json | 2 +-
theme.toml | 2 +-
9 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml
index 991ed152..481774f9 100644
--- a/config/_default/hugo.toml
+++ b/config/_default/hugo.toml
@@ -116,7 +116,7 @@ home = ["HTML", "RSS", "REDIR", "netlify", "server"]
[module]
[module.hugoVersion]
extended = true
- min = "0.136.3"
+ min = "0.141.0"
[[module.mounts]]
source = "archetypes"
target = "archetypes"
diff --git a/go.mod b/go.mod
index 652a1d22..cd265d5d 100644
--- a/go.mod
+++ b/go.mod
@@ -13,7 +13,7 @@ require (
github.com/gethinode/mod-leaflet v1.2.1 // indirect
github.com/gethinode/mod-lottie v1.5.13 // indirect
github.com/gethinode/mod-simple-datatables v1.1.6 // indirect
- github.com/gethinode/mod-utils/v2 v2.8.6 // indirect
+ github.com/gethinode/mod-utils/v2 v2.9.0 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 // indirect
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
)
diff --git a/go.sum b/go.sum
index ce542479..4fb6344c 100644
--- a/go.sum
+++ b/go.sum
@@ -378,6 +378,8 @@ github.com/gethinode/mod-utils/v2 v2.8.5 h1:e71ncO2NYpum7JTdNTwb0lw8aDe8Zc64Ehja
github.com/gethinode/mod-utils/v2 v2.8.5/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
github.com/gethinode/mod-utils/v2 v2.8.6 h1:gtTtL37YPq1n/POIzbj40aYOg1VaZq8IjqwSf2V5yo0=
github.com/gethinode/mod-utils/v2 v2.8.6/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
+github.com/gethinode/mod-utils/v2 v2.9.0 h1:IGaYO+DNo7CcplyAUJASP1sf10/EqiG8sVVM1Q4SJKc=
+github.com/gethinode/mod-utils/v2 v2.9.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
diff --git a/layouts/_default/_markup/render-codeblock-math.html b/layouts/_default/_markup/render-codeblock-math.html
index 6595d9fc..186b1509 100644
--- a/layouts/_default/_markup/render-codeblock-math.html
+++ b/layouts/_default/_markup/render-codeblock-math.html
@@ -1,11 +1,11 @@
-{{ with transform.ToMath .Inner (dict "displayMode" true) }}
+{{ with try (transform.ToMath .Inner (dict "displayMode" true)) }}
{{ with .Err }}
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
{{ else }}
{{ if $.Attributes.class }}
{{ . }}
{{ else }}
- {{ . }}
+ {{ .Value }}
{{ end }}
{{ end }}
{{ end }}
diff --git a/layouts/_default/_markup/render-passthrough.html b/layouts/_default/_markup/render-passthrough.html
index 7650d3e5..2619ebe4 100644
--- a/layouts/_default/_markup/render-passthrough.html
+++ b/layouts/_default/_markup/render-passthrough.html
@@ -4,10 +4,10 @@
{{ $opts = dict "displayMode" true }}
{{ end }}
-{{ with transform.ToMath .Inner $opts }}
+{{ with try (transform.ToMath .Inner $opts) }}
{{ with .Err }}
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
{{ else }}
- {{ . }}
+ {{ .Value }}
{{ end }}
{{ end }}
diff --git a/layouts/partials/assets/video.html b/layouts/partials/assets/video.html
index 677aa64c..438bae3a 100644
--- a/layouts/partials/assets/video.html
+++ b/layouts/partials/assets/video.html
@@ -68,11 +68,11 @@
{{ $api := printf "https://www.youtube.com/oembed?format=json&url=%s" (printf "https://www.youtube.com/watch?v=%s" $id) }}
{{ $padding := "56.25%" }}
- {{ with resources.GetRemote $api }}
+ {{ with try (resources.GetRemote $api) }}
{{ with .Err }}
{{ errorf "Unable to parse video metadata '%q': %s\n %s" $api $origin . }}
{{ else }}
- {{ $data := . | transform.Unmarshal }}
+ {{ $data := .Value | transform.Unmarshal }}
{{ if $autotitle }}{{ with $data.title }}{{ $title = . }}{{ end }}{{ end }}
{{ $padding = printf "%.2f%%" (mul (div $data.height $data.width) 100) }}
{{ end }}
@@ -97,11 +97,11 @@
{{- $dnt := cond $pc.EnableDNT 1 0 -}}
{{- $query := querify "url" $url "dnt" $dnt -}}
{{- $api := printf "https://vimeo.com/api/oembed.json?%s" $query -}}
- {{- with resources.GetRemote $api -}}
+ {{- with try (resources.GetRemote $api) -}}
{{ with .Err }}
{{ errorf "Unable to parse video metadata '%q': %s\n %s" $api $origin . }}
{{ else }}
- {{ $data := . | transform.Unmarshal }}
+ {{ $data := .Value | transform.Unmarshal }}
{{ if $autotitle }}{{ with $data.title }}{{ $title = . }}{{ end }}{{ end }}
{{ $padding = printf "%.2f%%" (mul (div $data.height $data.width) 100) }}
{{ end }}
diff --git a/package-lock.json b/package-lock.json
index 0cab28fc..78ba21ff 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,7 +13,7 @@
"autoprefixer": "^10.4.20",
"cssnano": "^7.0.6",
"cssnano-preset-advanced": "^7.0.6",
- "hugo-bin": "0.137.2",
+ "hugo-bin": "0.138.0",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {
@@ -4172,9 +4172,9 @@
}
},
"node_modules/hugo-bin": {
- "version": "0.137.2",
- "resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.137.2.tgz",
- "integrity": "sha512-tnq0BeOEHydDVboO3cVeq4aZ9ejzZA/iabSSuV346cQC8XwKH5rqZlA9xByJmijth4zZDeuvnDRpRVQf8NsHeA==",
+ "version": "0.138.0",
+ "resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.138.0.tgz",
+ "integrity": "sha512-WNpW+PQb9MFzZlaQBT354/MMN5/MWMvgQyTSHgIK/w8hfcefpcxklSnPmPXJxOYZNEphwzJ8jgDOwJ606gm0jA==",
"funding": [
{
"type": "github",
@@ -4182,6 +4182,7 @@
}
],
"hasInstallScript": true,
+ "license": "MIT",
"dependencies": {
"@xhmikosr/bin-wrapper": "^13.0.5",
"package-config": "^5.0.0"
diff --git a/package.json b/package.json
index 049ea1f3..dd66b7c7 100644
--- a/package.json
+++ b/package.json
@@ -73,7 +73,7 @@
"autoprefixer": "^10.4.20",
"cssnano": "^7.0.6",
"cssnano-preset-advanced": "^7.0.6",
- "hugo-bin": "0.137.2",
+ "hugo-bin": "0.138.0",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {
diff --git a/theme.toml b/theme.toml
index eda5771b..72fd63af 100644
--- a/theme.toml
+++ b/theme.toml
@@ -6,7 +6,7 @@ homepage = "https://gethinode.com"
demosite = "https://demo.gethinode.com"
tags = ["blog", "documentation", "minimal", "modern", "customizable", "search", "bootstrap"]
features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts", "versioned documentation"]
-min_version = "0.139.0"
+min_version = "0.141.0"
[author]
name = "Mark Dumay"