seo test v3

This commit is contained in:
Kalle (Sendou)
2020-12-14 11:26:33 +02:00
parent 105cbfc989
commit f7cc9ee7d0
3 changed files with 28 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
import Head from "next/head";
import { NextSeo } from "next-seo";
import { useRouter } from "next/router";
interface Props {
@@ -20,23 +20,27 @@ const SEO: React.FC<Props> = ({
const url = "https://sendou.ink" + router.pathname;
return (
<Head>
<title>{fullTitle}</title>
<meta name="title" content={fullTitle} />
<meta name="description" content={description} />
<meta property="og:type" content="website" />
<meta property="og:url" content={url} />
<meta property="og:title" content={fullTitle} />
<meta property="og:description" content={description} />
<meta property="og:image" content={imageSrc} />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content={url} />
<meta property="twitter:title" content={fullTitle} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={imageSrc} />
</Head>
<NextSeo
title={fullTitle}
description={description}
openGraph={{
url,
title,
description,
images: [
{
url: imageSrc,
width: 1200,
height: 628,
},
],
site_name: "sendou.ink",
}}
twitter={{
site: "@sendouink",
cardType: "summary_large_image",
}}
/>
);
};