import { parsePost, type Post } from '$/lib/blog/Post.svelte' const posts = import.meta.glob("./posts/*.svx") as Record Promise> const returnedData = Promise.all(Object.entries(posts).map(v => v[1]().then(r => [v[0], { ...parsePost(r as Post), default: null, }] as const))); export const load = async () => { return { posts: Object.fromEntries(await returnedData) } }