OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How do I set the Favicon icon at the top of my website in nuxt.js [duplicate]

  • Thread starter Thread starter Leeqi7
  • Start date Start date
L

Leeqi7

Guest
I first set it up in the nuxt.config.js file,Then putting the favicon.ico file in the root directory does not work, then putting it in the static folder does not work, and finally putting it in assets does not work, the icon at the top is not displayed

Code:
head:{
  link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ],
}

I also tried to change the configuration to the following and then adjust it, but it still did not take effect.

Code:
<head>
  <link rel='icon' type='image/png' href='/favicon.png'>
</head>

<p>I first set it up in the nuxt.config.js file,Then putting the favicon.ico file in the root directory does not work, then putting it in the static folder does not work, and finally putting it in assets does not work, the icon at the top is not displayed</p>
<pre><code>head:{
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
}
</code></pre>
<p>I also tried to change the configuration to the following and then adjust it, but it still did not take effect.</p>
<pre><code><head>
<link rel='icon' type='image/png' href='/favicon.png'>
</head>
</code></pre>
 

Online statistics

Members online
0
Guests online
3
Total visitors
3
Top