@@ -148,6 +148,17 @@ const wordCount = (post.body ?? "").split(/\s+/).filter(Boolean).length;
148148const readingTimeMinutes = post .data .readingTime || Math .ceil (wordCount / 200 );
149149const readingTimeString = ` ${readingTimeMinutes } ${readingTimeMinutes === 1 ? " minute" : " minutes" } ` ;
150150
151+ const publishedTimeISO = post .data .publishDate
152+ ? new Date (post .data .publishDate ).toISOString ()
153+ : null ;
154+
155+ const modifiedTimeISO = post .data .updatedDate
156+ ? new Date (post .data .updatedDate ).toISOString ()
157+ : publishedTimeISO ;
158+
159+ const articleAuthorUrl = " https://avaabrazzaq.com/about/" ;
160+ const articleSection = post .data .category ?? " AI & Technology" ;
161+
151162// Build the structured data graph
152163const structuredDataGraph: Record <string , unknown >[] = [
153164 {
@@ -283,12 +294,14 @@ const structuredData = {
283294 canonicalUrl ={ canonicalUrl }
284295 ogImage ={ ogImage }
285296 ogType =" article"
286- publishedTime ={ post . data . publishDate . toISOString () }
287- modifiedTime ={ post . data . updatedDate ?. toISOString () }
288- author ={ post . data . author }
297+ publishedTime ={ publishedTimeISO ?? undefined }
298+ modifiedTime ={ modifiedTimeISO ?? undefined }
299+ author ={ articleAuthorUrl }
289300 readingTime ={ readingTimeString }
290301 structuredData ={ structuredData }
291302>
303+ <meta slot =" head" property =" article:section" content ={ articleSection } />
304+
292305 <article class =" min-h-screen py-12" >
293306 <div class ={ CONTAINER_CLASSES .section } >
294307 <div class =" mx-auto max-w-3xl" >
@@ -319,15 +332,6 @@ const structuredData = {
319332 </div >
320333
321334 <!-- Title -->
322- <h1 class ={ ` ${TYPOGRAPHY_CLASSES .heroTitle } mb-6 ` } >
323- { post .data .title }
324- </h1 >
325-
326- <!-- Description -->
327- <p class ={ ` ${TYPOGRAPHY_CLASSES .subheading } mb-8 ` } >
328- { post .data .description }
329- </p >
330-
331335 <!-- Meta Info -->
332336 <div class =" flex flex-wrap items-center gap-4 text-sm text-[var(--text-base)] border-t border-b border-[var(--border-base)] py-4" >
333337 <div class =" flex items-center gap-2" >
0 commit comments