add markdown formatting with code support

This commit is contained in:
2026-09-01 11:19:13 +00:00
parent 4822125787
commit 0994f31281
7 changed files with 93 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import { db } from '$lib/server/db';
import { blogArticles } from '$lib/server/db/schema';
import { isAdmin } from '$lib/server/auth';
import { renderMarkdown } from '$lib/server/markdown';
import { eq } from 'drizzle-orm';
import type { PageServerLoad } from './$types.js';
@@ -28,6 +29,7 @@ export const load: PageServerLoad = async (event) => {
return {
blogArticle: article,
contentHtml: renderMarkdown(article.content ?? ''),
isAdmin: admin
};
};