Add first post for monday, add external posts from other authors, add components for internal and external links
14 lines
No EOL
443 B
TypeScript
14 lines
No EOL
443 B
TypeScript
import type { ExternalPost } from '../../shared/types/Blog'
|
|
|
|
export default defineEventHandler(async (): Promise<ExternalPost[]> => {
|
|
// Robert
|
|
const webertoireResponse: ExternalPost = await (await fetch('https://robertjanus.de/blog.json')).json()
|
|
const webertoireCut = webertoireResponse.posts.slice(0, 3).filter(filterBeforeFirstPost)
|
|
|
|
return [
|
|
{
|
|
author: webertoireResponse.author,
|
|
posts: webertoireCut,
|
|
},
|
|
]
|
|
}) |