@@ -55,9 +55,49 @@ export default async function BlogPostPage({ params }: Props) {
5555 const prevPost = currentIndex < allPosts . length - 1 ? allPosts [ currentIndex + 1 ] : null ;
5656 const nextPost = currentIndex > 0 ? allPosts [ currentIndex - 1 ] : null ;
5757
58+ const jsonLd = {
59+ '@context' : 'https://schema.org' ,
60+ '@type' : 'TechArticle' ,
61+ headline : post . title ,
62+ description : `GoSQLX ${ post . title } release notes.` ,
63+ datePublished : post . date ? `${ post . date } T00:00:00Z` : undefined ,
64+ dateModified : post . date ? `${ post . date } T00:00:00Z` : undefined ,
65+ url : `https://gosqlx.dev/blog/${ slug } /` ,
66+ author : {
67+ '@type' : 'Organization' ,
68+ name : 'GoSQLX' ,
69+ url : 'https://gosqlx.dev' ,
70+ } ,
71+ publisher : {
72+ '@type' : 'Organization' ,
73+ name : 'GoSQLX' ,
74+ url : 'https://gosqlx.dev' ,
75+ logo : {
76+ '@type' : 'ImageObject' ,
77+ url : 'https://gosqlx.dev/images/logo.webp' ,
78+ } ,
79+ } ,
80+ image : {
81+ '@type' : 'ImageObject' ,
82+ url : 'https://gosqlx.dev/images/og-image.png' ,
83+ width : 1200 ,
84+ height : 630 ,
85+ } ,
86+ mainEntityOfPage : {
87+ '@type' : 'WebPage' ,
88+ '@id' : `https://gosqlx.dev/blog/${ slug } /` ,
89+ } ,
90+ } ;
91+
5892 return (
59- < main className = "min-h-screen py-20 px-4" >
60- < article className = "max-w-3xl mx-auto" >
93+ < >
94+ < script
95+ type = "application/ld+json"
96+ suppressHydrationWarning
97+ dangerouslySetInnerHTML = { { __html : JSON . stringify ( jsonLd ) } }
98+ />
99+ < main className = "min-h-screen py-20 px-4" >
100+ < article className = "max-w-3xl mx-auto" >
61101 { /* Back link */ }
62102 < Link
63103 href = "/blog"
@@ -118,8 +158,9 @@ export default async function BlogPostPage({ params }: Props) {
118158 < div />
119159 ) }
120160 </ nav >
121- </ article >
122- </ main >
161+ </ article >
162+ </ main >
163+ </ >
123164 ) ;
124165}
125166
0 commit comments