add markdown formatting with code support
This commit is contained in:
@@ -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
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user