diff --git a/website/app/blog/[slug]/page.tsx b/website/app/blog/[slug]/page.tsx index 85cb583..e86a1a2 100644 --- a/website/app/blog/[slug]/page.tsx +++ b/website/app/blog/[slug]/page.tsx @@ -30,11 +30,11 @@ export default async function BlogPost({params}:Params){ const posts=allPosts(); const index=posts.findIndex(item=>item.slug===post.slug); const newer=posts[index-1],older=posts[index+1]; - const article={'@context':'https://schema.org','@type':'BlogPosting',headline:post.title,description:post.description,datePublished:post.date,dateModified:post.updated, + const article={'@context':'https://schema.org','@type':post.category==='Tech News'?'NewsArticle':'BlogPosting',headline:post.title,description:post.description,datePublished:post.date,dateModified:post.updated, mainEntityOfPage:absolute(`/blog/${post.slug}`),image:absolute(`/blog/${post.slug}/opengraph-image`),articleSection:post.category, ...(post.keywords.length?{keywords:post.keywords.join(', ')}:{}),wordCount:post.html.replace(/<[^>]+>/g,' ').split(/\s+/).filter(Boolean).length,inLanguage:'en', author:{'@type':'Organization',name:'Veyra',url:absolute('/')},publisher:{'@id':absolute('/#organization')}}; - return <>