frontpage/lib/content/types.ts

26 lines
471 B
TypeScript
Raw Normal View History

2022-06-23 16:21:20 +02:00
export type ContentList = (Project | Diary)[];
2022-06-12 14:22:15 +02:00
export type ContentType = "project" | "diary";
2022-03-15 17:21:10 +01:00
2022-06-23 16:21:20 +02:00
interface Content {
type: "project" | "diary";
2021-12-17 20:02:42 +01:00
name: string;
desc: string[];
2022-03-15 17:21:10 +01:00
short_desc: string;
2021-12-17 20:02:42 +01:00
more?: string;
repo?: string;
2022-10-01 14:04:21 +02:00
title: string;
2022-03-15 17:21:10 +01:00
}
2022-06-23 16:21:20 +02:00
export interface Project extends Content {
type: "project";
}
export interface Diary extends Content {
2022-06-12 14:22:15 +02:00
type: "diary";
2022-03-15 17:21:10 +01:00
entries: {
title: string;
2022-06-12 14:22:15 +02:00
filename: string;
2022-03-15 17:21:10 +01:00
}[];
2022-06-23 16:21:20 +02:00
}