Compare commits

...

14 Commits

Author SHA1 Message Date
Nuno Coração
1d21656d5e Merge pull request #2088 from nunocoracao/dev
🔖 v2.85.1
2025-05-02 11:40:00 +01:00
Nuno Coração
1731c36c7c Merge pull request #2091 from ZhenShuo2021/fix/gallery-path
🐛 fix: incorrect path for gallery (#2042)
2025-05-02 11:38:31 +01:00
Nuno Coração
a219b38010 Merge pull request #2092 from ZhenShuo2021/fix/i18n-code
🐛 fix: i18n items of code don't work (#1965)
2025-05-02 11:36:21 +01:00
Nuno Coração
70586cab25 Merge pull request #2090 from ZhenShuo2021/fix/github-card
🐛 fix: hugo minify breaks github card (#1434)
2025-05-02 11:34:37 +01:00
Nuno Coração
6fafc4b628 Merge pull request #2089 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2025-05-02 11:33:48 +01:00
Nuno Coração
b3dcccf856 updated version 2025-05-02 11:33:18 +01:00
ZhenShuo Leo
faa22c47d8 🐛 fix: i18n items of code don't work (#1965) 2025-05-02 18:20:41 +08:00
ZhenShuo Leo
6f33b9d5cf 🐛 fix: incorrect path for gallery
Fix this issue with resource.RelPermalink
2025-05-02 17:43:56 +08:00
ZhenShuo Leo
7072628632 🐛 fix: hugo minify breaks github card (#1434)
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#
2025-05-02 14:46:32 +08:00
nunocoracao
f0267b0338 Update Hugo supported version 2025-05-02 06:06:58 +00:00
Nuno Coração
d4538c93ec removed likes from examples 2025-05-01 17:53:48 +01:00
Nuno Coração
2d053f76c4 udpated stale.yaml 2025-05-01 17:41:14 +01:00
Nuno Coração
e6927136a4 udpated stale.yaml 2025-05-01 17:38:49 +01:00
Nuno Coração
a29c3734cb v2.86.0 2025-05-01 17:26:23 +01:00
11 changed files with 38 additions and 22 deletions

View File

@@ -26,3 +26,7 @@ jobs:
stale-pr-message: 'This pull request will be closed since it has been stale for 60 days.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 60
days-before-close: 0
remove-stale-when-updated: true
operations-per-run: 100

View File

@@ -2,4 +2,4 @@
[module.hugoVersion]
extended = true
min = "0.87.0"
max = "0.147.0"
max = "0.147.1"

View File

@@ -1,10 +1,6 @@
---
title: "Showcase"
description: "See what's possible with Blowfish."
showLikes: true
showViews: true
cascade:
showEdit: false
showReadingTime: false

View File

@@ -1,10 +1,6 @@
---
title: "ショーケース"
description: "Blowfish で何が出来るか見てみる。"
showLikes: true
showViews: true
cascade:
showEdit: false
showReadingTime: false

View File

@@ -1,10 +1,6 @@
---
title: "Showcase"
description: "See what's possible with Blowfish."
showLikes: true
showViews: true
cascade:
showEdit: false
showReadingTime: false

View File

@@ -1,10 +1,6 @@
---
title: "Showcase"
description: "See what's possible with Blowfish."
showLikes: true
showViews: true
cascade:
showEdit: false
showReadingTime: false

View File

@@ -72,7 +72,7 @@
{{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint
"sha512" }}
<script defer type="text/javascript" id="script-bundle" src="{{ $bundleJS.RelPermalink }}"
integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n " code.copy" }}" data-copied="{{ i18n " code.copied"
integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n "code.copy" }}" data-copied="{{ i18n "code.copied"
}}"></script>
{{ end }}
{{ if not .Site.Params.disableImageZoom | default true }}

View File

@@ -1,5 +1,31 @@
{{ $id := delimit (slice "gallery" (partial "functions/uid.html" .)) "-" }}
<div id="{{ $id }}" class="gallery">
{{ .Inner }}
</div>
{{ $page := .Page }}
{{/* find all img tags */}}
{{ $imgTagRegex := `<img\s+[^>]*>` }}
{{ $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 }}
</div>

View File

@@ -4,6 +4,7 @@
{{- $githubColors := .Site.Data.githubColors -}}
{{- with $githubData -}}
<div class="github-card-wrapper">
<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer">
<div
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
@@ -64,4 +65,5 @@
.catch(error => console.error(error))
</script>
</a>
</div>
{{- end -}}

View File

@@ -1,6 +1,6 @@
{
"name": "hugo-blowfish-theme",
"version": "2.85.0",
"version": "2.85.1",
"description": "Blowfish theme for Hugo.",
"scripts": {
"postinstall": "vendor-copy",

View File

@@ -1 +1 @@
v0.147.0
v0.147.1