Skip to content

Commit fc46b64

Browse files
committed
fix(docs): preserve dates when loading page content
1 parent 81cd1cc commit fc46b64

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎apps/docs/app/[[...slug]]/page.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,15 @@ export default async function Page(props: { params: Promise<{ slug?: string[] }>
316316
)
317317
}
318318

319-
const { body: MDX, toc } = await data.load()
319+
const { body: MDX, toc, lastModified } = await data.load()
320320

321321
return (
322322
<>
323323
<StructuredData
324324
title={data.title}
325325
description={data.description || ''}
326326
url={`${BASE_URL}${page.url}`}
327-
dateModified={data.lastModified?.toISOString()}
327+
dateModified={lastModified?.toISOString()}
328328
breadcrumb={breadcrumbs}
329329
/>
330330
<DocsPage

‎apps/docs/lib/source.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,5 @@ export type PageData = DocData &
129129
description?: string
130130
full?: boolean
131131
integration?: { type: string; color: string }
132-
load: () => Promise<DocData>
132+
load: () => Promise<DocData & { lastModified?: Date }>
133133
}

0 commit comments

Comments
 (0)