From a13022cd4c0a7cf0f00a6db49fad13db22d63dd6 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 5 May 2022 17:58:40 +0200 Subject: chore: add a Projects page --- src/ts/types/app.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/ts') 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 = { 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 = { export type Page = { content: string; - id: number; + id: number | string; intro: string; meta?: Meta; slug: string; @@ -88,5 +89,12 @@ export type Article = Page<'article'>; export type ArticleCard = Pick & Pick, 'cover' | 'dates'>; export type Project = Page<'project'>; +export type ProjectCard = Pick, 'id' | 'slug' | 'title'> & { + meta: Pick, 'cover' | 'dates' | 'tagline' | 'technologies'>; +}; export type Thematic = Page<'thematic'>; export type Topic = Page<'topic'>; + +export type Slug = { + slug: string; +}; -- cgit v1.2.3