Blog posts use Date type pubDate

This commit is contained in:
Joe Carstairs
2024-07-15 16:14:08 +01:00
parent dff4a997f8
commit ea96f40f7c
13 changed files with 20 additions and 69 deletions

View File

@@ -26,7 +26,7 @@ export async function GET(context: APIContext) {
link: `/blog/${post.slug}`,
title: post.data.title,
content: mdParser.render(post.body),
pubDate: new Date(`${post.data.pubDate.year}-${post.data.pubDate.month}-${post.data.pubDate.day}`),
pubDate: post.data.pubDate,
description: post.data.description,
author: 'Joe Carstairs',