oxen-website/types/cms.ts

45 lines
813 B
TypeScript
Raw Normal View History

2021-02-02 06:28:00 +01:00
import { Document } from '@contentful/rich-text-types';
2021-01-29 03:50:49 +01:00
export type IAuthor = {
name: string;
2021-02-02 06:28:00 +01:00
avatar?: IFigureImage;
2021-01-29 03:50:49 +01:00
shortBio: string;
email: string;
2021-01-31 11:02:19 +01:00
// Eg. Marketing Researcher
position: string | null;
twitter: string | null;
facebook: string | null;
github: string | null;
2021-01-29 03:50:49 +01:00
};
export type IFigureImage = {
2021-01-31 11:02:19 +01:00
title: string | null;
description: string | null;
2021-01-29 03:50:49 +01:00
imageUrl: string;
};
export type IPost = {
id: string;
title: string;
subtitle: string;
2021-02-02 06:28:00 +01:00
body: Document;
2021-01-29 03:50:49 +01:00
author?: IAuthor;
2021-01-31 11:02:19 +01:00
publishedDate: string;
featureImage?: IFigureImage;
tags: Array<string>;
slug: string;
2021-01-29 03:50:49 +01:00
};
2021-02-02 06:28:00 +01:00
export type BodyDocument = {
nodeType: 'document';
content: any;
};
2021-02-04 06:42:15 +01:00
export interface ISplitPage {
id: ISplitPage;
label: string;
title: string;
body: Document;
hero?: IFigureImage;
}