Merge pull request #185 from szpak/favicon-if2

Send optional favicons only if provided
This commit is contained in:
zzossig 2020-02-19 09:24:16 +09:00 committed by GitHub
commit 97d73a5e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -54,8 +54,12 @@
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
{{ else }}
{{ if (fileExists "static/apple-touch-icon.png") -}}
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | relURL }}">
<link rel="shortcut icon" href="{{ "favicon.png" | relURL }}" type="image/x-icon">
{{- end }}
<link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}" type="image/x-icon">
<link rel="icon" href="{{ "favicon.png" | relURL }}" sizes="any" type="image/png" />
{{ if (fileExists "static/logo.svg") -}}
<link rel="icon" href="{{ "logo.svg" | relURL }}" sizes="any" type="image/svg+xml" />
{{ end }}
{{- end }}
{{ end }}