Skip to main content
Our new developer certification is live!

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

PropTypeRequiredDefaultDescription
contentstringYes-Raw markdown content to render.
currentSlugstring[]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, and h3.
  • Resolves relative markdown links (./ and ../) to /docs/* routes.

Notes

  • Client component.
  • External links open in a new tab with safe rel attributes.