Last active
March 10, 2021 21:06
-
-
Save mxro/9af3b1f818fba8d9a514f2c6b9216fab to your computer and use it in GitHub Desktop.
Example for adding description to 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" /> | |
<meta name="description" content="My description" /> | |
<meta property="og:description" content="My description" /> | |
</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