From cc033f1ce71c8fedf6e97d10c372366bcb8a8599 Mon Sep 17 00:00:00 2001 From: Luca Martial Date: Mon, 11 May 2026 00:37:12 -0700 Subject: [PATCH] feat(docs): wire CodeBlock into MDX components map All
 elements in docs MDX now render through CodeBlock,
which selects one of three modes based on language and title.
CSS styling for each mode follows.
---
 docs/app/docs/[[...slug]]/page.tsx | 47 ++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 docs/app/docs/[[...slug]]/page.tsx

diff --git a/docs/app/docs/[[...slug]]/page.tsx b/docs/app/docs/[[...slug]]/page.tsx
new file mode 100644
index 00000000..f2b560e6
--- /dev/null
+++ b/docs/app/docs/[[...slug]]/page.tsx
@@ -0,0 +1,47 @@
+import { source } from "@/lib/source";
+import {
+  DocsPage,
+  DocsBody,
+  DocsTitle,
+  DocsDescription,
+} from "fumadocs-ui/page";
+import { notFound } from "next/navigation";
+import defaultMdxComponents from "fumadocs-ui/mdx";
+import { CodeBlock } from "@/components/code-block";
+
+export default async function Page(props: {
+  params: Promise<{ slug?: string[] }>;
+}) {
+  const params = await props.params;
+  const page = source.getPage(params.slug);
+  if (!page) notFound();
+
+  const MDX = page.data.body;
+
+  return (
+    
+      {page.data.title}
+      {page.data.description}
+      
+        
+      
+    
+  );
+}
+
+export function generateStaticParams() {
+  return source.generateParams();
+}
+
+export async function generateMetadata(props: {
+  params: Promise<{ slug?: string[] }>;
+}) {
+  const params = await props.params;
+  const page = source.getPage(params.slug);
+  if (!page) notFound();
+
+  return {
+    title: page.data.title,
+    description: page.data.description,
+  };
+}