MarkdownRenderer
Client-side markdown renderer used by the docs route. It parses markdown with GFM support and maps markdown elements to project-specific rendering behavior.
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
content | string | Yes | - | Raw markdown content to render. |
currentSlug | string[] | Yes | - | Current docs slug used to resolve relative markdown links. |
Usage
import MarkdownRenderer from "@/components/system/MarkdownRenderer";
<MarkdownRenderer content={markdown} currentSlug={slug} />Features
- Supports GitHub Flavored Markdown via
remark-gfm. - Converts fenced code blocks to
CodeBlockWithCopy. - Adds stable heading IDs to
h1,h2, andh3. - Resolves relative markdown links (
./and../) to/docs/*routes.
Notes
- Client component.
- External links open in a new tab with safe rel attributes.