aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts/types/articles.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-25 15:33:27 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-25 15:38:50 +0100
commit97dc68e22e754d8e478beee590dbe9868171af50 (patch)
tree01876f9b236b0a4ba696d5b084bd766b69046494 /src/ts/types/articles.ts
parent71942c86311a9d1ddf4ae486d811f8393786e855 (diff)
chore: add reading time in posts meta
Diffstat (limited to 'src/ts/types/articles.ts')
-rw-r--r--src/ts/types/articles.ts18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ts/types/articles.ts b/src/ts/types/articles.ts
index 88b79dd..5281e7e 100644
--- a/src/ts/types/articles.ts
+++ b/src/ts/types/articles.ts
@@ -1,4 +1,4 @@
-import { ContentParts, Dates } from './app';
+import { ContentInfo, ContentParts, Dates } from './app';
import { Comment, CommentsNode } from './comments';
import { Cover, RawCover } from './cover';
import { SEO } from './seo';
@@ -24,10 +24,12 @@ export type ArticleMeta = {
author?: ArticleAuthor;
commentCount?: number;
dates?: Dates;
+ readingTime?: number;
results?: number;
topics?: TopicPreview[];
thematics?: ThematicPreview[];
website?: string;
+ wordsCount?: number;
};
export type Article = {
@@ -39,6 +41,7 @@ export type Article = {
dates: Dates;
featuredImage: Cover;
id: string;
+ info: ContentInfo;
intro: string;
seo: SEO;
topics: TopicPreview[] | [];
@@ -48,7 +51,7 @@ export type Article = {
export type RawArticle = Pick<
Article,
- 'commentCount' | 'databaseId' | 'id' | 'seo' | 'title'
+ 'commentCount' | 'databaseId' | 'id' | 'info' | 'seo' | 'title'
> & {
acfPosts: RawACFPosts;
author: { node: ArticleAuthor };
@@ -61,12 +64,19 @@ export type RawArticle = Pick<
export type ArticlePreview = Pick<
Article,
- 'commentCount' | 'dates' | 'id' | 'intro' | 'topics' | 'thematics' | 'title'
+ | 'commentCount'
+ | 'dates'
+ | 'id'
+ | 'info'
+ | 'intro'
+ | 'topics'
+ | 'thematics'
+ | 'title'
> & { featuredImage: Cover; slug: string };
export type RawArticlePreview = Pick<
Article,
- 'commentCount' | 'id' | 'title'
+ 'commentCount' | 'id' | 'info' | 'title'
> & {
acfPosts: ACFPosts;
contentParts: Pick<ContentParts, 'beforeMore'>;