refactor: switched to mdx for better styling

This commit is contained in:
robin committed 2026-08-04 15:32:04 +02:00
1 parent 5e78869cbf
commit 18f8496af9
6 files changed
+660 -24

No files matched your search

+3 -3
View File
@@ -7,7 +7,7 @@ import html from 'remark-html';
export type WikiArticle = {
slug: string;
title: string;
contentHtml: string;
rawContent: string;
updatedAt?: string;
};
@@ -15,7 +15,7 @@ const wikiDirectory = path.join(process.cwd(), "data/wiki/pages");
export async function getWikiPageBySlug(slug: string): Promise<WikiArticle | null> {
try {
const fullPath = path.join(wikiDirectory, `${slug}.md`);
const fullPath = path.join(wikiDirectory, `${slug}.mdx`);
const fileContents = fs.readFileSync(fullPath, "utf-8");
// read metadata
@@ -29,7 +29,7 @@ export async function getWikiPageBySlug(slug: string): Promise<WikiArticle | nul
return {
slug,
contentHtml,
rawContent: content,
title: data.title || 'Unbenannt',
updatedAt: data.updatedAt || null,
...data,