moved blog over to BlogPostLink data type to fix error 500 on page refresh

This commit is contained in:
2026-01-31 16:35:17 +01:00
parent 06b4d9c318
commit 6c8d0aae08
5 changed files with 30 additions and 22 deletions

View File

@@ -15,7 +15,13 @@ export interface BlogPostDetails {
description: string;
}
export const posts = new Map<string, BlogPostDetails>([
export interface BlogPostLink {
key: string;
post: BlogPostDetails;
}
export const posts: BlogPostLink[] = [
// ["2026/0128", {
// date: "2026-01-05",
// time: "13:00",
@@ -23,14 +29,17 @@ export const posts = new Map<string, BlogPostDetails>([
// title: "Portsmouth Postmortem",
// description: "",
// }],
["2026/0129", {
date: "2026-01-29",
time: "16:42",
banner: "girl.webp",
title: "Limitations",
description: "Something about how boundaries can foster creativity.",
}],
]);
{
key: "2026/0129",
post: {
date: "2026-01-29",
time: "16:42",
banner: "girl.webp",
title: "Limitations",
description: "Something about how boundaries can foster creativity.",
}
},
];
// export function getDate(post: BlogPostDetails): string {
// var s = [post.year, post.date.split()].join("");