style: add more components and add test wiki page

This commit is contained in:
robin committed 2026-08-04 15:37:30 +02:00
1 parent fd4da2a43f
commit 3d82ef9671
5 files changed
+113 -14

No files matched your search

+8 -3
View File
@@ -2,10 +2,15 @@ import { getWikiPageBySlug } from '@/lib/wiki';
import { notFound } from 'next/navigation';
import { MDXRemote } from 'next-mdx-remote/rsc';
import { Callout } from '@/components/markdown/Callout';
import { Callout, Grid, Card, Steps, Step } from '@/components/mdx-components';
const components = {
const mdxComponents = {
Callout,
Grid,
Card,
Steps,
Step,
h2: (props: any) => <h2 className="text-2xl font-bold text-white mt-12 mb-4" {...props} />,
};
type PageProps = {
@@ -26,7 +31,7 @@ export default async function Page({ params }: PageProps) {
<article className="prose prose-invert max-w-none p-6">
<h1>{article.title}</h1>
{/* Direkte MDX-Rendering-Komponente von Next.js */}
<MDXRemote source={article.rawContent} components={components} />
<MDXRemote source={article.rawContent} components={mdxComponents} />
</article>
);
}