diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-04-12 11:50:37 +0200 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-04-12 11:50:37 +0200 |
commit | ffa1533a191bf09ea5934e8821de7d26275f8521 (patch) | |
tree | a3cbf697efae2a38b4a90c523cd4e2cba64555ce /pages/search.tsx | |
parent | f0e25c71e148758a76ee8d4807aa1262f25edc5d (diff) |
added recent posts to home page
Diffstat (limited to 'pages/search.tsx')
-rw-r--r-- | pages/search.tsx | 11 |
1 files changed, 6 insertions, 5 deletions
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; }) { </div>; } -interface Post { +export interface Post { title: string; subtitle: string; author: string; date: string; - urlname: string; + id: string; + cover: string; tags: Array<string>; } -interface PostsInfo { +export interface PostsInfo { valid_tags: Array<string>; posts: Array<Post>; } function Post(props: { post: Post; }) { - return <a className='post' href={'/post/' + props.post.urlname}> + return <a className='post' href={'/post/' + props.post.id}> <b className='title'>{props.post.title}</b> {props.post.subtitle && <p className='subtitle'>{props.post.subtitle}</p>} <p className='authordate'> @@ -96,7 +97,7 @@ export default function SearchPage() { 'subtitle', 'author', 'date', - 'urlname', + 'id', 'tags', ], isCaseSensitive: false, |