|
|
|
@ -45,9 +45,12 @@ export async function loadSinglePage(slug: string): Promise<Post | null> {
|
|
|
|
|
|
|
|
|
|
if (!data.title) return null;
|
|
|
|
|
|
|
|
|
|
const [year, month, day] = postMatch.groups?.date.split('-') || []
|
|
|
|
|
const date = new Date(Date.UTC(parseInt(year), parseInt(month) - 1, parseInt(day)))
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
slug: postMatch.groups?.slug || '',
|
|
|
|
|
date: new Date(postMatch.groups?.date || ''),
|
|
|
|
|
date,
|
|
|
|
|
title: data.title,
|
|
|
|
|
subtitle: data.subtitle,
|
|
|
|
|
unlisted: typeof data.unlisted === 'boolean' ? data.unlisted : false,
|
|
|
|
|