add blog, initial post

This commit is contained in:
2025-12-22 00:52:35 +02:00
parent a82235f882
commit 2063002971
32 changed files with 3507 additions and 135 deletions

View File

@@ -0,0 +1,15 @@
import type { PageLoad } from './$types';
import { error } from '@sveltejs/kit';
export const load: PageLoad = async ({ params }) => {
try {
const post = await import(`../${params.slug}.md`);
return {
content: post.default,
metadata: post.metadata
};
} catch (e) {
throw error(404, `Post not found: ${params.slug}. Error: ${e}`);
}
};