mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: get link favicon from remote by google api
This commit is contained in:
@@ -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" . -}}
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user