create-fumadocs-app 15.2.4 → 15.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3SSTN7F3.js → chunk-TIC3QPNP.js} +17 -17
- package/dist/create-app.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/template/+next/mdx-components.tsx +9 -0
- package/template/+next+content-collections/app/docs/[[...slug]]/page.tsx +5 -7
- package/template/+next+fuma-docs-mdx/app/docs/[[...slug]]/page.tsx +4 -5
|
@@ -60,7 +60,7 @@ function tryGitInit(root) {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// src/versions.js
|
|
63
|
-
var versions = { "fumadocs-core": "15.2.
|
|
63
|
+
var versions = { "fumadocs-core": "15.2.5", "fumadocs-ui": "15.2.5", "fumadocs-mdx": "11.5.8", "@fumadocs/mdx-remote": "1.3.0", "@fumadocs/content-collections": "1.1.8" };
|
|
64
64
|
|
|
65
65
|
// ../create-app-versions/package.json
|
|
66
66
|
var package_default = {
|
|
@@ -73,11 +73,11 @@ var package_default = {
|
|
|
73
73
|
"@content-collections/core": "^0.8.2",
|
|
74
74
|
"@content-collections/mdx": "^0.2.2",
|
|
75
75
|
"@content-collections/next": "^0.2.6",
|
|
76
|
-
"@react-router/dev": "^7.
|
|
77
|
-
"@react-router/node": "^7.
|
|
78
|
-
"@react-router/serve": "^7.
|
|
79
|
-
"@tailwindcss/postcss": "^4.1.
|
|
80
|
-
"@tailwindcss/vite": "^4.1.
|
|
76
|
+
"@react-router/dev": "^7.5.0",
|
|
77
|
+
"@react-router/node": "^7.5.0",
|
|
78
|
+
"@react-router/serve": "^7.5.0",
|
|
79
|
+
"@tailwindcss/postcss": "^4.1.3",
|
|
80
|
+
"@tailwindcss/vite": "^4.1.3",
|
|
81
81
|
"@tanstack/react-router": "^1.114.34",
|
|
82
82
|
"@tanstack/react-start": "^1.114.34",
|
|
83
83
|
"@types/mdx": "^2.0.13",
|
|
@@ -92,13 +92,13 @@ var package_default = {
|
|
|
92
92
|
postcss: "^8.5.3",
|
|
93
93
|
react: "^19.1.0",
|
|
94
94
|
"react-dom": "^19.1.0",
|
|
95
|
-
"react-router": "^7.
|
|
96
|
-
"react-router-devtools": "^1.1.
|
|
95
|
+
"react-router": "^7.5.0",
|
|
96
|
+
"react-router-devtools": "^1.1.9",
|
|
97
97
|
shiki: "^3.2.1",
|
|
98
|
-
tailwindcss: "^4.1.
|
|
99
|
-
typescript: "^5.8.
|
|
98
|
+
tailwindcss: "^4.1.3",
|
|
99
|
+
typescript: "^5.8.3",
|
|
100
100
|
vinxi: "^0.5.3",
|
|
101
|
-
vite: "^6.2.
|
|
101
|
+
vite: "^6.2.5",
|
|
102
102
|
"vite-tsconfig-paths": "^5.1.4"
|
|
103
103
|
}
|
|
104
104
|
};
|
|
@@ -154,16 +154,16 @@ async function create(options) {
|
|
|
154
154
|
const projectName = path.basename(options.outputDir);
|
|
155
155
|
const dest = path.resolve(cwd, options.outputDir);
|
|
156
156
|
const isNext = options.template.startsWith("+next");
|
|
157
|
+
function isRelative(dir, file) {
|
|
158
|
+
return !path.relative(path.join(dest, dir), file).startsWith(`..${path.sep}`);
|
|
159
|
+
}
|
|
157
160
|
function defaultRename(file) {
|
|
158
161
|
file = file.replace("example.gitignore", ".gitignore");
|
|
159
162
|
if (!options.useSrcDir || !isNext) {
|
|
160
163
|
return file;
|
|
161
164
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
if (!relative.startsWith(`..${path.sep}`)) {
|
|
165
|
-
return path.join(dest, "src", dir, relative);
|
|
166
|
-
}
|
|
165
|
+
if (path.basename(file) === "mdx-components.tsx" || isRelative("app", file) || isRelative("lib", file)) {
|
|
166
|
+
return path.join(dest, "src", path.relative(dest, file));
|
|
167
167
|
}
|
|
168
168
|
return file;
|
|
169
169
|
}
|
|
@@ -331,7 +331,7 @@ function createPackageJson(projectName, options) {
|
|
|
331
331
|
private: true,
|
|
332
332
|
scripts: {
|
|
333
333
|
build: "next build",
|
|
334
|
-
dev: "next dev",
|
|
334
|
+
dev: "next dev --turbo",
|
|
335
335
|
start: "next start",
|
|
336
336
|
...options.template === "+next+fuma-docs-mdx" ? {
|
|
337
337
|
postinstall: "fumadocs-mdx"
|
package/dist/create-app.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { source } from '@/lib/source';
|
|
2
|
-
import type { Metadata } from 'next';
|
|
3
2
|
import {
|
|
4
3
|
DocsPage,
|
|
5
4
|
DocsBody,
|
|
@@ -8,7 +7,8 @@ import {
|
|
|
8
7
|
} from 'fumadocs-ui/page';
|
|
9
8
|
import { notFound } from 'next/navigation';
|
|
10
9
|
import { MDXContent } from '@content-collections/mdx/react';
|
|
11
|
-
import
|
|
10
|
+
import { createRelativeLink } from 'fumadocs-ui/mdx';
|
|
11
|
+
import { getMDXComponents } from '@/mdx-components';
|
|
12
12
|
|
|
13
13
|
export default async function Page(props: {
|
|
14
14
|
params: Promise<{ slug?: string[] }>;
|
|
@@ -24,12 +24,10 @@ export default async function Page(props: {
|
|
|
24
24
|
<DocsBody>
|
|
25
25
|
<MDXContent
|
|
26
26
|
code={page.data.body}
|
|
27
|
-
components={{
|
|
28
|
-
...defaultMdxComponents,
|
|
27
|
+
components={getMDXComponents({
|
|
29
28
|
// this allows you to link to other pages with relative file paths
|
|
30
29
|
a: createRelativeLink(source, page),
|
|
31
|
-
|
|
32
|
-
}}
|
|
30
|
+
})}
|
|
33
31
|
/>
|
|
34
32
|
</DocsBody>
|
|
35
33
|
</DocsPage>
|
|
@@ -50,5 +48,5 @@ export async function generateMetadata(props: {
|
|
|
50
48
|
return {
|
|
51
49
|
title: page.data.title,
|
|
52
50
|
description: page.data.description,
|
|
53
|
-
}
|
|
51
|
+
};
|
|
54
52
|
}
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
DocsTitle,
|
|
7
7
|
} from 'fumadocs-ui/page';
|
|
8
8
|
import { notFound } from 'next/navigation';
|
|
9
|
-
import
|
|
9
|
+
import { createRelativeLink } from 'fumadocs-ui/mdx';
|
|
10
|
+
import { getMDXComponents } from '@/mdx-components';
|
|
10
11
|
|
|
11
12
|
export default async function Page(props: {
|
|
12
13
|
params: Promise<{ slug?: string[] }>;
|
|
@@ -23,12 +24,10 @@ export default async function Page(props: {
|
|
|
23
24
|
<DocsDescription>{page.data.description}</DocsDescription>
|
|
24
25
|
<DocsBody>
|
|
25
26
|
<MDXContent
|
|
26
|
-
components={{
|
|
27
|
-
...defaultMdxComponents,
|
|
27
|
+
components={getMDXComponents({
|
|
28
28
|
// this allows you to link to other pages with relative file paths
|
|
29
29
|
a: createRelativeLink(source, page),
|
|
30
|
-
|
|
31
|
-
}}
|
|
30
|
+
})}
|
|
32
31
|
/>
|
|
33
32
|
</DocsBody>
|
|
34
33
|
</DocsPage>
|