cleanup markdown

This commit is contained in:
2026-06-18 01:32:05 +02:00
parent c1fe73dbd0
commit 73ba2b573d
11 changed files with 137 additions and 26 deletions

View File

@@ -1,13 +1,11 @@
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "~/components/ui/card"
import { cn } from "~/lib/utils"
import Markdown from 'react-markdown'
import { format } from 'date-fns'
import rehypeHighlight from 'rehype-highlight'
import rehypeRaw from 'rehype-raw'
import type { ArrayElement } from "type-fest"
import AnimateTextIn from "~/app/_components/Animated/AnimateIn"
import AnimatePopUp from "~/app/_components/Animated/AnimatePopUp"
import type { CvCategoryData } from "./CvCategory"
import { ClientMdx } from "~/components/ClientMdx"
export type CvEntryData = ArrayElement<CvCategoryData['cvEntry']>
@@ -30,7 +28,7 @@ export default function CvEntry({ entry, className, position = 0 }: {
<CardContent className="text-sm lg:text-base">
<AnimatePopUp position={position + 0.2}>
<article className="prose prose-zinc dark:prose-invert max-w-none">
<Markdown rehypePlugins={[rehypeHighlight, rehypeRaw]}>{entry.description}</Markdown>
<ClientMdx source={entry.description} fallback={entry.description} />
</article>
</AnimatePopUp>
</CardContent> :