refactor(favicon); change favicon related setup

This commit is contained in:
Sped0n
2023-11-04 16:27:05 +08:00
parent bf3ddfc3f8
commit 8d9dc0c121
14 changed files with 23 additions and 77 deletions

View File

@@ -1,13 +1,12 @@
{{- if site.Params.favicon -}}
{{- with site.Params.svgFavicon -}}
<link rel="icon" href="{{ . }}" />
<link rel="icon" type="image/svg+xml" href="{{ . }}" />
{{- with site.Params.svgFaviconFallback -}}
<link rel="icon" type="image/png" href="{{ . }}" />
{{- end -}}
{{- else -}}
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
{{- end -}}
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
{{- with site.Params.iconColor -}}
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="{{ . }}" />
{{- end -}}
{{- end -}}