Archived
authors
This commit is contained in:
@@ -111,4 +111,9 @@ export async function getPostData(id: string): Promise<PostData> {
|
||||
export function getPostsByTag(tag: string): PostMetadata[] {
|
||||
const allPosts = getSortedPostsData();
|
||||
return allPosts.filter(post => post.tags.includes(tag));
|
||||
}
|
||||
|
||||
export function getPostsByAuthor(author: string): PostMetadata[] {
|
||||
const allPosts = getSortedPostsData();
|
||||
return allPosts.filter(post => post.author.includes(author));
|
||||
}
|
||||
Reference in New Issue
Block a user