Feat: get link favicon from remote by google api

This commit is contained in:
Cell
2025-04-09 16:08:23 +08:00
parent ed14126001
commit 40c5dcb8c2
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -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" . -}}
+2
View File
@@ -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 -}}