How to add a favicon to a Next.js static site?

后端 未结 6 1855
既然无缘
既然无缘 2021-02-03 20:52

I\'m trying to add a favicon to a Next.js static site without much luck.

I\'ve tried customising the document with components from \'next/document\' https:/

6条回答
  •  失恋的感觉
    2021-02-03 21:07

    Simply added your favicon.ico in public folder, Next js will automatically take that favicon for all pages.

    No need to add any favicon link to any pages or in tag no need to add link for favicon.

    https://github.com/zeit/next.js/blob/master/errors/static-dir-deprecated.md

提交回复
热议问题