From 40c5dcb8c2746cc99144c4b81afa06327dece615 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Wed, 9 Apr 2025 16:08:23 +0800 Subject: [PATCH] :sparkles: Feat: get link favicon from remote by google api --- layouts/partials/init/index.html | 2 +- layouts/partials/plugin/link.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index a87bf468..9ab3d28f 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.17-22c3353d" -}} +{{- .Scratch.Set "version" "v0.3.17-ed141260" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}} diff --git a/layouts/partials/plugin/link.html b/layouts/partials/plugin/link.html index 0ca1019e..49e66542 100644 --- a/layouts/partials/plugin/link.html +++ b/layouts/partials/plugin/link.html @@ -45,6 +45,8 @@ {{- if not $cardIcon -}} {{- with partial "function/get-remote-image.html" (dict "Src" (add "https://favicon.im/" $url.Host)) -}} {{- $cardIcon = .RelPermalink -}} + {{- else with partial "function/get-remote-image.html" (dict "Src" (add "https://api.lruihao.cn/google/s2/favicons?sz=64&domain=" $url.Host)) -}} + {{- $cardIcon = .RelPermalink -}} {{- end -}} {{- end -}}