🐛 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#
This commit is contained in:
ZhenShuo Leo
2025-05-02 14:46:32 +08:00
parent d4538c93ec
commit 7072628632

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 -}}