fix: icon bug
MODIFY
layout/_partial/head.ejs
layout/_partial/head.ejs
description = strip_html(page.content).substring(0, 120);
}
description = description ? description : pageTitle;
+
+ let iconType = 'image/png'
+ let faviconExt = theme.favicon.substr(theme.favicon.lastIndexOf('.') + 1, theme.favicon.length)
+ if (faviconExt === 'png') {
+ iconType = 'image/png'
+ } else if (faviconExt === 'svg') {
+ iconType = 'image/svg+xml'
+ } else if (faviconExt === 'gif') {
+ iconType = 'image/gif'
+ } else if (faviconExt === 'jpeg') {
+ iconType = 'image/jpeg'
+ } else if (faviconExt === 'jpg') {
+ iconType = 'image/jpeg'
+ } else if (faviconExt === 'ico') {
+ iconType = 'image/x-icon, image/vnd.microsoft.icon'
+ } else {
+ // more definitions
+ }
%>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title><%= pageTitle %></title>
- <link rel="icon" type="image/png" href="<%- theme.favicon %>">
+ <link rel="icon" type="<%= iconType %>" href="<%- theme.favicon %>">
<link rel="stylesheet" type="text/css" href="/libs/awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="/libs/materialize/css/materialize.min.css">

fix: icon bug