Skip to content

Commit 3e763c8

Browse files
committed
Fumadocs wrangler setup
1 parent bda59db commit 3e763c8

8 files changed

Lines changed: 19 additions & 18 deletions

File tree

docs/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ yarn-error.log*
2626
next-env.d.ts
2727

2828
# opennext
29-
.open-next/
29+
.open-next/
30+
.wrangler/

docs/next.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const root = path.resolve(import.meta.dirname, "..");
88
/** @type {import('next').NextConfig} */
99
const config = {
1010
reactStrictMode: true,
11-
outputFileTracingRoot: root,
1211
turbopack: {
1312
root,
1413
},

docs/open-next.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import { defineCloudflareConfig } from "@opennextjs/cloudflare";
22

3-
export default defineCloudflareConfig({});
3+
export default {
4+
...defineCloudflareConfig({}),
5+
appPath: ".",
6+
};

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "shape-morph",
3-
"version": "0.0.0",
3+
"version": "0.4.0",
44
"private": true,
55
"scripts": {
66
"build": "next build",

docs/source.config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import path from "node:path";
12
import { metaSchema, pageSchema } from "fumadocs-core/source/schema";
23
import { defineConfig, defineDocs } from "fumadocs-mdx/config";
4+
import { remarkAutoTypeTable } from "fumadocs-typescript";
35

46
// You can customise Zod schemas for frontmatter and `meta.json` here
57
// see https://fumadocs.dev/docs/mdx/collections
@@ -18,6 +20,11 @@ export const docs = defineDocs({
1820

1921
export default defineConfig({
2022
mdxOptions: {
21-
// MDX options
23+
remarkPlugins: [
24+
[
25+
remarkAutoTypeTable,
26+
{ name: "AutoTypeTable", options: { basePath: path.resolve(".") } },
27+
],
28+
],
2229
},
2330
});

docs/src/app/(home)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Metadata } from "next";
33
import Link from "next/link";
44
import { MorphBackground } from "@/components/morph-background";
55
import { ScatteredShapes } from "@/components/scattered-shapes";
6-
import packageJson from "../../../../package.json";
6+
import packageJson from "../../../package.json";
77

88
export const metadata: Metadata = {
99
openGraph: {

docs/src/app/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const googleSans = Google_Sans({
99
});
1010

1111
export const metadata: Metadata = {
12+
metadataBase: new URL("https://shape-morph.thereallo.dev"),
1213
title: {
1314
default: "shape-morph",
1415
template: "%s | shape-morph",

docs/src/mdx-components.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1-
import {
2-
createFileSystemGeneratorCache,
3-
createGenerator,
4-
} from "fumadocs-typescript";
5-
import { AutoTypeTable } from "fumadocs-typescript/ui";
1+
import { TypeTable } from "fumadocs-ui/components/type-table";
62
import defaultMdxComponents from "fumadocs-ui/mdx";
73
import type { MDXComponents } from "mdx/types";
84
import { ShapeGallery } from "@/components/shape-gallery";
95

10-
const generator = createGenerator({
11-
cache: createFileSystemGeneratorCache(".next/fumadocs-typescript"),
12-
});
13-
146
export function getMDXComponents(components?: MDXComponents): MDXComponents {
157
return {
168
...defaultMdxComponents,
179
ShapeGallery,
18-
AutoTypeTable: (props) => (
19-
<AutoTypeTable {...props} generator={generator} />
20-
),
10+
TypeTable,
2111
...components,
2212
};
2313
}

0 commit comments

Comments
 (0)