Unverified Commit 912f7467 authored by Lee Robinson's avatar Lee Robinson Committed by GitHub

Update next/head docs to clarify duplicate tags. (#12033)

parent a6beed01
...@@ -43,16 +43,16 @@ function IndexPage() { ...@@ -43,16 +43,16 @@ function IndexPage() {
<Head> <Head>
<title>My page title</title> <title>My page title</title>
<meta <meta
name="viewport" property="og:title"
content="initial-scale=1.0, width=device-width" content="My page title"
key="viewport" key="title"
/> />
</Head> </Head>
<Head> <Head>
<meta <meta
name="viewport" property="og:title"
content="initial-scale=1.2, width=device-width" content="My new title"
key="viewport" key="title"
/> />
</Head> </Head>
<p>Hello world!</p> <p>Hello world!</p>
...@@ -63,7 +63,7 @@ function IndexPage() { ...@@ -63,7 +63,7 @@ function IndexPage() {
export default IndexPage export default IndexPage
``` ```
In this case only the second `<meta name="viewport" />` is rendered. In this case only the second `<meta property="og:title" />` is rendered. `meta` tags with duplicate `name` attributes are automatically handled.
> The contents of `head` get cleared upon unmounting the component, so make sure each page completely defines what it needs in `head`, without making assumptions about what other pages added. > The contents of `head` get cleared upon unmounting the component, so make sure each page completely defines what it needs in `head`, without making assumptions about what other pages added.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment