Chrysoblog/src/routes/[slug]/+page.ts

13 lines
268 B
TypeScript
Raw Normal View History

2024-10-10 14:34:52 -07:00
import type { PageLoad } from './$types';
export const load: PageLoad = async ({ params }) => {
const post = await import(`$content/extra/${params.slug}.md`);
const Content = post.default;
return {
slug: params.slug,
metadata: post.metadata,
Content,
};
}