I'm having problems getting mobile metatags into a nextJS app. According to the docs here, this should work https://nextjs.org/docs#populating-head
But I don't see the title or any of my own meta properties getting rendered. All I see is:
<!DOCTYPE html><html><head><meta charSet="utf-8" class="next-head"/>
which looks like some type of default.
import Link from 'next/link'
import Head from 'next/head'
import Header from '../components/Header'
import BaseLayout from '../components/BaseLayout.js'
const Index = () => (
<BaseLayout>
<Head>
<title>HSK App</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</Head>
<Link href='/quizList'>
<h3>HSK Quiz App!</h3>
</Link>
</BaseLayout>
)
export default Index
Help appreciated!
<Head>
in_document.js
isn't supported anymore. There's an explicit warning to avoid it, and you should instead use it in_app.js
if you need to set global tags. – Mali