diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-01-28 11:55:03 +0100 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-01-28 11:55:03 +0100 |
commit | 9f75ff1d2d5ebf34c040474e836e125f80253365 (patch) | |
tree | 523c52b9dd158e21d9247b58d81c655102323a26 /lib/interfaces.ts | |
parent | c11d7a84aa59e9b1179a9834129b2d776bab8bca (diff) | |
download | kronikarz-9f75ff1d2d5ebf34c040474e836e125f80253365.tar.gz kronikarz-9f75ff1d2d5ebf34c040474e836e125f80253365.zip |
Add Post class
Diffstat (limited to 'lib/interfaces.ts')
-rw-r--r-- | lib/interfaces.ts | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/lib/interfaces.ts b/lib/interfaces.ts index 1d598c6..974765f 100644 --- a/lib/interfaces.ts +++ b/lib/interfaces.ts @@ -1,24 +1,33 @@ -interface Date { +export interface Date { year: string; month: string; day: string; } -interface Meta { - [key: string]: string; +/*export interface Meta { + [key: string]: object; +}*/ + +export interface Meta { + title: string; + author: string; + additionalMeta: object; } -export interface PostContent { - html: string; - markdown: string; - description: string; - meta: Meta; +export interface FrontMatterObject { + body: string; + attributes: Meta; } -export interface Post { - date: Date; +export interface PostApiListEntry { + date: string; + author: string; title: string; - content: PostContent; - filePath: string; - route: string; + path: string; + description: string; + meta: object; +} + +export interface PostApiEntry extends PostApiListEntry { + content: string; } |