Last active
March 10, 2021 20:43
-
-
Save mxro/983d6876e2fc1c04084fc57a64946261 to your computer and use it in GitHub Desktop.
Example of adding title to a Next.js page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Head from 'next/head'; | |
const Index = (): JSX.Element => { | |
return ( | |
<> | |
<Head> | |
<title>My Page title</title> | |
<meta property="og:title" content="My page title" key="title" /> | |
</Head> | |
<h1>My page title</h1> | |
<> | |
); | |
}; | |
export default Index; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment