From a29c3734cb59440b10912082cc766ae7f7969c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Thu, 1 May 2025 17:26:23 +0100 Subject: [PATCH 1/6] v2.86.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d8597d9f..81cd90a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.85.0", + "version": "2.86.0", "description": "Blowfish theme for Hugo.", "scripts": { "postinstall": "vendor-copy", From f0267b03383cd37c4e92d0e01b673c6b56928027 Mon Sep 17 00:00:00 2001 From: nunocoracao <3803196+nunocoracao@users.noreply.github.com> Date: Fri, 2 May 2025 06:06:58 +0000 Subject: [PATCH 2/6] Update Hugo supported version --- config.toml | 2 +- release-versions/hugo-latest.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 13506671..e3c7bd62 100644 --- a/config.toml +++ b/config.toml @@ -2,4 +2,4 @@ [module.hugoVersion] extended = true min = "0.87.0" -max = "0.147.0" \ No newline at end of file +max = "0.147.1" \ No newline at end of file diff --git a/release-versions/hugo-latest.txt b/release-versions/hugo-latest.txt index 670964c6..e79ab786 100644 --- a/release-versions/hugo-latest.txt +++ b/release-versions/hugo-latest.txt @@ -1 +1 @@ -v0.147.0 +v0.147.1 From 70726286321783b9be655ebe9c4b98659660506d Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Fri, 2 May 2025 14:46:32 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=90=9B=20fix:=20hugo=20minify=20break?= =?UTF-8?q?s=20github=20card=20(#1434)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a div wrapper to avoid incorrect minification by hugo. Tested with sample https://codeberg.org/cthru/blowfish_test/src/branch/master/content/tests/1716983769844-github-card-test/index.md# --- layouts/shortcodes/github.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/shortcodes/github.html b/layouts/shortcodes/github.html index 56146975..484d7e90 100644 --- a/layouts/shortcodes/github.html +++ b/layouts/shortcodes/github.html @@ -4,6 +4,7 @@ {{- $githubColors := .Site.Data.githubColors -}} {{- with $githubData -}} +
{{- end -}} From 6f33b9d5cfd4c285cc245baafc80b07ab2d3a005 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Fri, 2 May 2025 17:43:56 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=90=9B=20fix:=20incorrect=20path=20fo?= =?UTF-8?q?r=20gallery?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix this issue with resource.RelPermalink --- layouts/shortcodes/gallery.html | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html index c01b48f8..31d9bc9b 100644 --- a/layouts/shortcodes/gallery.html +++ b/layouts/shortcodes/gallery.html @@ -1,5 +1,31 @@ {{ $id := delimit (slice "gallery" (partial "functions/uid.html" .)) "-" }} \ No newline at end of file + {{ $page := .Page }} + + {{/* find all img tags */}} + {{ $imgTagRegex := `]*>` }} + {{ $imgTags := findRE $imgTagRegex .Inner }} + {{ $newContent := .Inner }} + + {{ range $imgTags }} + {{ $imgTag := . }} + {{/* extract src attribute */}} + {{ $srcRegex := `src=['"]([^'"]+)['"]` }} + {{ $srcMatches := findRESubmatch $srcRegex $imgTag }} + + {{ if $srcMatches }} + {{ $srcFull := index (index $srcMatches 0) 0 }} + {{ $src := index (index $srcMatches 0) 1 }} + + {{ $resource := $page.Resources.GetMatch $src }} + {{ if $resource }} + {{ $newSrc := printf `src="%s"` $resource.RelPermalink }} + {{ $newImg := replace $imgTag $srcFull $newSrc }} + {{ $newContent = replace $newContent $imgTag $newImg }} + {{ end }} + {{ end }} + {{ end }} + + {{ $newContent | safeHTML }} +
From faa22c47d87f1925666f8046ea517127b50a8319 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Fri, 2 May 2025 18:20:41 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=90=9B=20fix:=20i18n=20items=20of=20c?= =?UTF-8?q?ode=20don't=20work=20(#1965)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 27ca17d6..46f47769 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -72,7 +72,7 @@ {{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint "sha512" }} {{ end }} {{ if not .Site.Params.disableImageZoom | default true }} From b3dcccf856ee73b78c1dd05b95e034d30cb8e606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 2 May 2025 11:33:18 +0100 Subject: [PATCH 6/6] updated version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 81cd90a7..35c422c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.86.0", + "version": "2.85.1", "description": "Blowfish theme for Hugo.", "scripts": { "postinstall": "vendor-copy",