Answers for "add favicon next.js static site"

23

add favicon to next js static site

1.Create a /static folder in project root. This will be added to the static export folder.
2.Add favicon file in /static folder.
3.Add _document.js to /pages/ folder according to documentation (nextjs.org) or documentation (github.com).
4.Add <link rel="shortcut icon" href="/static/favicon.ico" /> to head.
5.npm run build && npm run export
Posted by: Guest on July-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language