create-fumadocs-app 13.4.0 → 13.4.2
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-YYPU6ANP.js → chunk-RECYQEEL.js} +8 -5
- package/dist/create-app.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/template/fuma-docs-mdx/app/api/search/route.ts +1 -1
- package/template/fuma-docs-mdx/app/docs/[[...slug]]/page.tsx +6 -9
- package/template/fuma-docs-mdx/app/source.ts +2 -3
- package/template/fuma-docs-mdx/next.config.mjs +1 -1
- package/template/fuma-docs-mdx/source.config.ts +5 -0
- package/template/fuma-docs-mdx/mdx-components.tsx +0 -9
|
@@ -60,7 +60,7 @@ function tryGitInit(root) {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// versions.json
|
|
63
|
-
var versions_default = { "fumadocs-core": "13.4.
|
|
63
|
+
var versions_default = { "fumadocs-core": "13.4.2", "fumadocs-ui": "13.4.2", "fumadocs-mdx": "10.0.0", "@fumadocs/content-collections": "1.1.4" };
|
|
64
64
|
|
|
65
65
|
// ../create-app-versions/package.json
|
|
66
66
|
var package_default = {
|
|
@@ -74,12 +74,12 @@ var package_default = {
|
|
|
74
74
|
"@content-collections/mdx": "^0.1.3",
|
|
75
75
|
"@content-collections/next": "^0.2.0",
|
|
76
76
|
"@types/mdx": "^2.0.13",
|
|
77
|
-
"@types/node": "22.
|
|
78
|
-
"@types/react": "^18.3.
|
|
77
|
+
"@types/node": "22.5.2",
|
|
78
|
+
"@types/react": "^18.3.5",
|
|
79
79
|
"@types/react-dom": "^18.3.0",
|
|
80
80
|
autoprefixer: "^10.4.20",
|
|
81
|
-
next: "^14.2.
|
|
82
|
-
postcss: "^8.4.
|
|
81
|
+
next: "^14.2.7",
|
|
82
|
+
postcss: "^8.4.42",
|
|
83
83
|
react: "^18.3.1",
|
|
84
84
|
"react-dom": "^18.3.1",
|
|
85
85
|
tailwindcss: "^3.4.10",
|
|
@@ -216,6 +216,9 @@ function createPackageJson(projectName, { template, tailwindcss }) {
|
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
if (template === "fuma-docs-mdx") {
|
|
219
|
+
Object.assign(packageJson.scripts, {
|
|
220
|
+
postinstall: "fumadocs-mdx"
|
|
221
|
+
});
|
|
219
222
|
Object.assign(packageJson.dependencies, {
|
|
220
223
|
"fumadocs-mdx": versions_default["fumadocs-mdx"]
|
|
221
224
|
});
|
package/dist/create-app.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-fumadocs-app",
|
|
3
|
-
"version": "13.4.
|
|
3
|
+
"version": "13.4.2",
|
|
4
4
|
"description": "Create a new documentation site with Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/cross-spawn": "^6.0.6",
|
|
28
|
-
"@types/node": "22.
|
|
28
|
+
"@types/node": "22.5.2",
|
|
29
29
|
"fast-glob": "^3.3.1",
|
|
30
30
|
"eslint-config-custom": "0.0.0",
|
|
31
31
|
"tsconfig": "0.0.0"
|
|
@@ -4,7 +4,7 @@ import { createSearchAPI } from 'fumadocs-core/search/server';
|
|
|
4
4
|
export const { GET } = createSearchAPI('advanced', {
|
|
5
5
|
indexes: getPages().map((page) => ({
|
|
6
6
|
title: page.data.title,
|
|
7
|
-
structuredData: page.data.
|
|
7
|
+
structuredData: page.data.structuredData,
|
|
8
8
|
id: page.url,
|
|
9
9
|
url: page.url,
|
|
10
10
|
})),
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DocsTitle,
|
|
8
8
|
} from 'fumadocs-ui/page';
|
|
9
9
|
import { notFound } from 'next/navigation';
|
|
10
|
+
import defaultComponents from 'fumadocs-ui/mdx';
|
|
10
11
|
|
|
11
12
|
export default async function Page({
|
|
12
13
|
params,
|
|
@@ -14,19 +15,16 @@ export default async function Page({
|
|
|
14
15
|
params: { slug?: string[] };
|
|
15
16
|
}) {
|
|
16
17
|
const page = getPage(params.slug);
|
|
18
|
+
if (!page) notFound();
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
notFound();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const MDX = page.data.exports.default;
|
|
20
|
+
const MDX = page.data.body;
|
|
23
21
|
|
|
24
22
|
return (
|
|
25
|
-
<DocsPage toc={page.data.
|
|
23
|
+
<DocsPage toc={page.data.toc} full={page.data.full}>
|
|
26
24
|
<DocsTitle>{page.data.title}</DocsTitle>
|
|
27
25
|
<DocsDescription>{page.data.description}</DocsDescription>
|
|
28
26
|
<DocsBody>
|
|
29
|
-
<MDX />
|
|
27
|
+
<MDX componens={defaultComponents} />
|
|
30
28
|
</DocsBody>
|
|
31
29
|
</DocsPage>
|
|
32
30
|
);
|
|
@@ -40,8 +38,7 @@ export async function generateStaticParams() {
|
|
|
40
38
|
|
|
41
39
|
export function generateMetadata({ params }: { params: { slug?: string[] } }) {
|
|
42
40
|
const page = getPage(params.slug);
|
|
43
|
-
|
|
44
|
-
if (page == null) notFound();
|
|
41
|
+
if (!page) notFound();
|
|
45
42
|
|
|
46
43
|
return {
|
|
47
44
|
title: page.data.title,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { docs, meta } from '@/.source';
|
|
2
2
|
import { createMDXSource } from 'fumadocs-mdx';
|
|
3
3
|
import { loader } from 'fumadocs-core/source';
|
|
4
4
|
|
|
5
5
|
export const { getPage, getPages, pageTree } = loader({
|
|
6
6
|
baseUrl: '/docs',
|
|
7
|
-
|
|
8
|
-
source: createMDXSource(map),
|
|
7
|
+
source: createMDXSource(docs, meta),
|
|
9
8
|
});
|