bgenc.net/src/routes/[slug]/+page.ts
Kaan Barmore-Genç 9ab243fa4e
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add more OG tags and title tags
2024-05-10 23:42:18 -05:00

15 lines
272 B
TypeScript

export async function load({ params }) {
const post = await import(`../posts/${params.slug}.md`);
const { title, date, excerpt, image } = post.metadata;
const content = post.default;
return {
content,
title,
excerpt,
image,
date,
slug: params.slug,
};
}