summaryrefslogtreecommitdiffstats
path: root/src/ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-05 17:58:40 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-05 18:20:18 +0200
commita13022cd4c0a7cf0f00a6db49fad13db22d63dd6 (patch)
tree80dce20873c8812a07ced25b6ded1c4d272fb23a /src/ts
parentee04742d1f0645908baa30e47845126c28848f50 (diff)
chore: add a Projects page
Diffstat (limited to 'src/ts')
-rw-r--r--src/ts/types/app.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts
index 4d9c71c..87ab042 100644
--- a/src/ts/types/app.ts
+++ b/src/ts/types/app.ts
@@ -62,6 +62,7 @@ export type Meta<T extends PageKind> = {
readingTime: number;
repos?: T extends 'projects' ? Repos : never;
seo: SEO;
+ tagline?: T extends 'projects' ? string : never;
technologies?: T extends 'projects' ? string[] : never;
thematics?: T extends 'article' | 'topic' ? PageLink[] : never;
topics?: T extends 'article' | 'thematic' ? PageLink[] : never;
@@ -71,7 +72,7 @@ export type Meta<T extends PageKind> = {
export type Page<T extends PageKind> = {
content: string;
- id: number;
+ id: number | string;
intro: string;
meta?: Meta<T>;
slug: string;
@@ -88,5 +89,12 @@ export type Article = Page<'article'>;
export type ArticleCard = Pick<Article, 'id' | 'slug' | 'title'> &
Pick<Meta<'article'>, 'cover' | 'dates'>;
export type Project = Page<'project'>;
+export type ProjectCard = Pick<Page<'project'>, 'id' | 'slug' | 'title'> & {
+ meta: Pick<Meta<'project'>, 'cover' | 'dates' | 'tagline' | 'technologies'>;
+};
export type Thematic = Page<'thematic'>;
export type Topic = Page<'topic'>;
+
+export type Slug = {
+ slug: string;
+};