added structure for blog posts

This commit is contained in:
2026-01-05 12:35:16 +00:00
parent 022c1eeeae
commit bd68821ca6
7 changed files with 83 additions and 1 deletions

29
src/routes/blog/posts.ts Normal file
View File

@@ -0,0 +1,29 @@
export interface BlogPostDetails {
date: string;
/**
* Short title to be used in URL.
*/
shortTitle: string;
fullTitle: string;
/**
* Description to be used in page's metadata.
*/
description: string;
}
export const posts = new Map<string, BlogPostDetails>([
["2026/0105", {
date: "2026-01-05",
shortTitle: "portsmouth",
fullTitle: "Portsmouth Postmortem",
description: "",
}],
]);
// export function getDate(post: BlogPostDetails): string {
// var s = [post.year, post.date.split()].join("");
// s.
// return "";
// }