@@ -18,8 +18,47 @@ const ogImage = `/og/blog/${normalizePostSlug(post.slug)}.png`;
1818
1919const dateStr = post .data .date .toISOString ().slice (0 , 10 );
2020const updatedStr = post .data .updated ? post .data .updated .toISOString ().slice (0 , 10 ) : null ;
21+
22+ const siteUrl = Astro .site ?.href ?? " https://clickin.github.io/" ;
23+ const postUrl = new URL (` /blog/${normalizePostSlug (post .slug )}/ ` , siteUrl ).href ;
24+
25+ const structuredData = {
26+ " @context" : " https://schema.org" ,
27+ " @type" : " BlogPosting" ,
28+ " headline" : post .data .title ,
29+ " description" : post .data .description ,
30+ " image" : new URL (ogImage , siteUrl ).href ,
31+ " datePublished" : post .data .date .toISOString (),
32+ " dateModified" : post .data .updated ?.toISOString () ?? post .data .date .toISOString (),
33+ " author" : {
34+ " @type" : " Person" ,
35+ " name" : " Clickin" ,
36+ " url" : siteUrl
37+ },
38+ " publisher" : {
39+ " @type" : " Organization" ,
40+ " name" : " Clickin Devlog" ,
41+ " logo" : {
42+ " @type" : " ImageObject" ,
43+ " url" : new URL (" /favicon.png" , siteUrl ).href
44+ }
45+ },
46+ " mainEntityOfPage" : {
47+ " @type" : " WebPage" ,
48+ " @id" : postUrl
49+ }
50+ };
2151---
22- <BaseLayout title ={ post .data .title } description ={ post .data .description } ogImage ={ ogImage } mainClass =" max-w-7xl mx-auto px-4 sm:px-6" >
52+ <BaseLayout
53+ title ={ post .data .title }
54+ description ={ post .data .description }
55+ ogImage ={ ogImage }
56+ mainClass =" max-w-7xl mx-auto px-4 sm:px-6"
57+ type =" article"
58+ publishDate ={ post .data .date }
59+ updatedDate ={ post .data .updated }
60+ structuredData ={ structuredData }
61+ >
2362 <!-- Mobile Category Navigation -->
2463 <div class =" lg:hidden mb-4" >
2564 <CategorySidebar activeCategoryPath ={ post .data .category .split (" >" ).map (s => s .trim ()).join (" /" )} />
0 commit comments