From 8d937546224d544de51f895843b2563beecb349e Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 18 Aug 2025 21:58:22 +0800 Subject: fix: image icon does not display as expected Former-commit-id: 25859328ff650f34fb9b5c64916f66e8c3fc707e --- layouts/term.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/layouts/term.html b/layouts/term.html index fc0d9b43..ffdbdf95 100644 --- a/layouts/term.html +++ b/layouts/term.html @@ -5,8 +5,13 @@

- {{ with .Params.icon }} - {{ . }} + {{ if or (hasPrefix .Page.Params.icon "http://") (hasPrefix .Page.Params.icon "https://") }} + + {{ .Page.LinkTitle }} + + {{ else }} + {{ .Page.Params.icon }} {{ end }} {{ if and (eq .Data.Singular "tag") (not .Params.icon) }}#{{ end }}{{ .Title }}

-- cgit v1.2.3