summary refs log tree commit diff
path: root/lib/interfaces.ts
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-01-28 11:55:03 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-01-28 11:55:03 +0100
commit9f75ff1d2d5ebf34c040474e836e125f80253365 (patch)
tree523c52b9dd158e21d9247b58d81c655102323a26 /lib/interfaces.ts
parentc11d7a84aa59e9b1179a9834129b2d776bab8bca (diff)
downloadkronikarz-9f75ff1d2d5ebf34c040474e836e125f80253365.tar.gz
kronikarz-9f75ff1d2d5ebf34c040474e836e125f80253365.zip
Add Post class
Diffstat (limited to 'lib/interfaces.ts')
-rw-r--r--lib/interfaces.ts35
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;
 }