![](/img/trans.png)
[英]How can I set the custom marker icon for my leaflet map with NUXT.js
[英]How do I set the Favicon icon at the top of my website in nuxt.js
我先在nuxt.config.js文件里设置,然后把favicon.ico文件放到根目录下不行,再放到static文件夹不行,最后放到assets里面不行,顶部的图标不显示
head:{
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
}
我也试过把配置改成如下再调整,还是没有生效。
<head>
<link rel='icon' type='image/png' href='/favicon.png'>
</head>
您可以按照以下步骤完成它:
导航到 static 文件夹并删除 favicon.ico 文件。
现在,前面是 go 并在 static 文件夹中添加一个新的图标(注意图标名称应该是favicon.ico
确认您的 nuxt 配置文件中是否包含以下内容:
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.