How to add a favicon to a Next.js static site?
问题 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://nextjs.org/docs/#custom-document A straight link to the favicon.ico file doesn't work because the file isn't included in the build and the href doesn't update to /_next/static/... Importing the image and adding to the link's href doesn't work either (see commented out lines). import React from 'react'; import Document, { Html, Head, Main,