mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 15:09:47 +00:00
Add JSON-LD microdata for blog posts
This commit is contained in:
@@ -99,6 +99,27 @@ export function PageHead({
|
||||
<meta property='og:title' content={title} />
|
||||
<meta name='twitter:title' content={title} />
|
||||
<title>{title}</title>
|
||||
|
||||
{/* Better SEO for the blog posts */}
|
||||
{isBlogPost && (
|
||||
<script type='application/ld+json'>
|
||||
{JSON.stringify({
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'BlogPosting',
|
||||
'@id': `${url}#BlogPosting`,
|
||||
mainEntityOfPage: url,
|
||||
url,
|
||||
headline: title,
|
||||
name: title,
|
||||
description,
|
||||
author: {
|
||||
'@type': 'Person',
|
||||
name: config.author
|
||||
},
|
||||
image: socialImageUrl
|
||||
})}
|
||||
</script>
|
||||
)}
|
||||
</Head>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user