Next.js Discord

Discord Forum

How do I add link to the head using metadata

Answered
Manx posted this in #help-forum
Open in Discord
ManxOP
I want to implement PWA and I need to add some links, tho it seems that Nextjs only allows head elements to be added through the exported metadata.
I wanna add these:
<link rel="manifest" href="/resources/manifest.json" />
<link rel="apple-touch-icon" href="/media/icons/logo.svg" />
<link rel="apple-mobile-webapp-status-bar" content="#444" />
Answered by joulev
you can simply add them to the page like normal react components. they will be automatically hoisted to <head>
View full answer

3 Replies