Fix icon filename extension

If `favicon.ico` or `logo.ico` exists, `/images/favicon.icon`  or `/images/logo.icon`  should be `/images/favicon.ico`  or `/images/logo.ico`.
This commit is contained in:
Justin Lin 2021-11-26 08:21:24 +08:00 committed by GitHub
parent 4053dc8565
commit fcb27db2c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,11 +4,11 @@
{{- else if (fileExists "/static/images/favicon.png") -}}
<link rel="icon" href="{{ "/images/favicon.png" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/png">
{{- else if (fileExists "/static/images/favicon.ico") -}}
<link rel="icon" href="{{ "/images/favicon.icon" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/x-icon">
<link rel="icon" href="{{ "/images/favicon.ico" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/x-icon">
{{- else if (fileExists "/static/images/logo.svg") -}}
<link rel="icon" href="{{ "/images/logo.svg" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/svg+xml">
{{- else if (fileExists "/static/images/logo.png") -}}
<link rel="icon" href="{{ "/images/logo.png" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/png">
{{- else if (fileExists "/static/images/logo.ico") -}}
<link rel="icon" href="{{ "/images/logo.icon" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/x-icon">
<link rel="icon" href="{{ "/images/logo.ico" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" type="image/x-icon">
{{- end }}