From ffa1533a191bf09ea5934e8821de7d26275f8521 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 12 Apr 2021 11:50:37 +0200 Subject: added recent posts to home page --- pages/search.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'pages/search.tsx') diff --git a/pages/search.tsx b/pages/search.tsx index db5cc89..8daff50 100644 --- a/pages/search.tsx +++ b/pages/search.tsx @@ -22,22 +22,23 @@ function SearchBar(props: { searchFunction: () => void; }) { ; } -interface Post { +export interface Post { title: string; subtitle: string; author: string; date: string; - urlname: string; + id: string; + cover: string; tags: Array; } -interface PostsInfo { +export interface PostsInfo { valid_tags: Array; posts: Array; } function Post(props: { post: Post; }) { - return + return {props.post.title} {props.post.subtitle &&

{props.post.subtitle}

}

@@ -96,7 +97,7 @@ export default function SearchPage() { 'subtitle', 'author', 'date', - 'urlname', + 'id', 'tags', ], isCaseSensitive: false, -- cgit v1.2.3