Merge pull request #2088 from nunocoracao/dev

🔖 v2.85.1
This commit is contained in:
Nuno Coração
2025-05-02 11:40:00 +01:00
committed by GitHub
6 changed files with 34 additions and 6 deletions

View File

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

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