Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 3399a67

Browse files
committed
add <DefaultSeo /> component
1 parent f0b6365 commit 3399a67

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

pages/_app.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import '@/styles/index.css'
33
import {ApolloProvider} from '@apollo/client'
44
import {useApollo} from '@/api/wordpress/connector'
55
import Error from 'next/error'
6+
import {DefaultSeo} from 'next-seo'
67

78
export default function App({Component, pageProps}) {
89
/**
@@ -23,7 +24,27 @@ export default function App({Component, pageProps}) {
2324
{error ? (
2425
<Error statusCode={500} title={errorMessage} />
2526
) : (
26-
<Component {...pageProps} />
27+
<>
28+
<DefaultSeo
29+
title="Next.js WordPress Starter"
30+
description="Query from Yoast SEO"
31+
openGraph={{
32+
type: 'website',
33+
locale: 'en_US',
34+
url: 'Query from Yoast SEO',
35+
site_name: '',
36+
images: [
37+
{
38+
url: 'Query from Yoast SEO',
39+
width: 'Query from Yoast SEO',
40+
height: 'Query from Yoast SEO',
41+
alt: 'Query from Yoast SEO'
42+
}
43+
]
44+
}}
45+
/>
46+
<Component {...pageProps} />
47+
</>
2748
)}
2849
</ApolloProvider>
2950
)

0 commit comments

Comments
 (0)