12 lines
332 B
TypeScript
12 lines
332 B
TypeScript
import type { LayoutLoad } from './$types'
|
|
export const prerender = true
|
|
|
|
export const load = (async ({ fetch }) => {
|
|
const blogPostsResponse = await fetch(`/articles/pageSize/5.json`)
|
|
const blogPostsContent = await blogPostsResponse.json()
|
|
|
|
return {
|
|
latestPosts: blogPostsContent.posts.items,
|
|
}
|
|
}) satisfies LayoutLoad
|