Законченный MVP

This commit is contained in:
sbb45
2026-05-28 21:03:35 +05:00
parent a566bab1ae
commit 55583e2101
30 changed files with 1883 additions and 143 deletions
+9
View File
@@ -0,0 +1,9 @@
import { error } from '@sveltejs/kit';
import { getPostBySlug } from '$lib/blog/posts';
import type { PageLoad } from './$types';
export const load: PageLoad = ({ params }) => {
const post = getPostBySlug(params.slug);
if (!post) throw error(404, 'Статья не найдена');
return { post };
};