we are trying with the code below to apply the SEO tag to our site but it seem those tag not working, can someone please help us to know how we can apply the SEO tags successfully
<Head>
<title>{meta_title}</title>
<meta name="robots" content="INDEX,FOLLOW" />
<meta name="description" content={meta_description} />
<meta name="keywords" content={meta_keywords} />
<meta property="og:type" content="website" />
<meta property="og:url" content={window.location.href} />
<meta property="og:title" content={meta_title} />
<meta property="og:description" content={meta_description} />
<meta property="og:image" content="/assets/images/banners/banner-subcribe-page.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:url" content={window.location.href} />
<meta name="twitter:title" content={meta_title} />
<meta name="twitter:description" content={meta_description} />
<meta name="twitter:image" content="/assets/images/banners/banner-subcribe-page.png" />
</Head>
export async function getStaticProps() {
const { getCmsPage } = DEFAULT_OPERATIONS
const cmsUrl = ''
const client = new ApolloClient({
uri: process.env.MAGENTO_BACKEND_URL,
cache: new InMemoryCache(),
})
const { data } = await client.query({
query: RESOLVE_URL,
variables: {
url: `/${cmsUrl}`,
},
})
const cmsId = get(data, 'urlResolver.id')
const { data: cmsPage } = await client.query({
query: getCmsPage,
variables: {
id: cmsId,
},
})
return { props: { cmsPage: cmsPage || null } }
}