#Global Favicon Doesn't Load Globally

13 messages · Page 1 of 1 (latest)

vale swift
#

In _document.tsx file, we've got a favicon loaded. This is visible in the code below. It works on most pages, but once they get a certain depth they stop working. The short version is that it works for normal pages and archive pages, but not single pages. Looking for a reason, so it can be fixed.

// imports 
import { Head } from 'next/document';

// component
<Head>
  <link rel='icon' href='img/favicon.ico' />
</Head>
raw mulchBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

soft magnet
#

Where is your favicon located in the folder structore?

vale swift
#

Example of pages working:

/
/about
/blog
/contact
/product
/category
/legal

Example of pages NOT working:

/blog/awesome-blog-name
/product/awesome-shirt
/category/awesome-category
/legal/terms
/legal/privacy
vale swift
soft magnet
#

Do you see the link tag at all at the pages not working?

soft magnet
#

I mean in the source code in the browser

vale swift
#

No. It's not in the HTML. I was expecting that it would be, and I'd just update the path URL.

soft magnet
#

Alright, yeah thats weird, have you tried moving the image from /imgto the root of public?

soft magnet
#

Or, try making the href: /img/favicon.ico

vale swift
#

That's a winner. LoL! Sometimes it's the stupid stuff that baffles you most.