Skip to content

Instantly share code, notes, and snippets.

@mxro
Last active March 10, 2021 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxro/9af3b1f818fba8d9a514f2c6b9216fab to your computer and use it in GitHub Desktop.
Save mxro/9af3b1f818fba8d9a514f2c6b9216fab to your computer and use it in GitHub Desktop.
Example for adding description to Next.js page.
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