nextjs-github-pages
nextjs-github-pages copied to clipboard
fix favicon returning 404
Fix favicon returning error 404
Description
I've found out that there is an issue with the favicon not loading properly on firefox (didn't test on other browsers) and returning a 404 error as it does not take into account the assetPrefix set in the config file.
To fix that I replaced the href="/favicon.ico" to href="favicon.ico?". I don't know what the "?" does as I did not tested without it, but it works for me.
Source: https://stackoverflow.com/a/61073510/12619942
Screenshot

Steps to Verify
I'm using Firefox 104.0.1 (64-bit) on Fedora Linux 36 (Workstation Edition). When opening https://gregrickaby.github.io/nextjs-github-pages/, the favicon isn't shown and after opening the inspection tool the request to the favicon asset returned a 404 error.
Might as well edit your blog post.
No longer an issue with Firefox. Closing.