create-fumadocs-app 13.4.10 → 14.0.1
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-BMGPWUX5.js → chunk-EC7RZFC3.js} +22 -22
- package/dist/create-app.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/template/+shared/app/(home)/layout.tsx +2 -2
- package/template/+shared/app/(home)/page.tsx +1 -1
- package/template/+shared/app/api/search/route.ts +4 -0
- package/template/+shared/app/docs/layout.tsx +3 -3
- package/template/+shared/app/layout.config.tsx +2 -2
- package/template/+shared/app/layout.tsx +7 -1
- package/template/+tailwindcss/app/(home)/page.tsx +1 -1
- package/template/+tailwindcss/app/layout.tsx +1 -1
- package/template/content-collections/app/docs/[[...slug]]/page.tsx +9 -3
- package/template/fuma-docs-mdx/app/docs/[[...slug]]/page.tsx +9 -8
- package/template/fuma-docs-mdx/source.config.ts +3 -1
- package/template/fuma-docs-mdx/tsconfig.json +1 -1
- package/template/content-collections/app/api/search/route.ts +0 -11
- package/template/fuma-docs-mdx/app/api/search/route.ts +0 -12
- /package/template/content-collections/{app → lib}/source.ts +0 -0
- /package/template/fuma-docs-mdx/{app → lib}/source.ts +0 -0
|
@@ -10,7 +10,7 @@ function isInGitRepository(cwd2) {
|
|
|
10
10
|
try {
|
|
11
11
|
execSync("git rev-parse --is-inside-work-tree", { stdio: "ignore", cwd: cwd2 });
|
|
12
12
|
return true;
|
|
13
|
-
} catch
|
|
13
|
+
} catch {
|
|
14
14
|
return false;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -18,7 +18,7 @@ function isInMercurialRepository(cwd2) {
|
|
|
18
18
|
try {
|
|
19
19
|
execSync("hg --cwd . root", { stdio: "ignore", cwd: cwd2 });
|
|
20
20
|
return true;
|
|
21
|
-
} catch
|
|
21
|
+
} catch {
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -26,7 +26,7 @@ function isDefaultBranchSet(cwd2) {
|
|
|
26
26
|
try {
|
|
27
27
|
execSync("git config init.defaultBranch", { stdio: "ignore", cwd: cwd2 });
|
|
28
28
|
return true;
|
|
29
|
-
} catch
|
|
29
|
+
} catch {
|
|
30
30
|
return false;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -48,19 +48,19 @@ function tryGitInit(root) {
|
|
|
48
48
|
cwd: root
|
|
49
49
|
});
|
|
50
50
|
return true;
|
|
51
|
-
} catch
|
|
51
|
+
} catch {
|
|
52
52
|
if (didInit) {
|
|
53
53
|
try {
|
|
54
54
|
rmSync(join(root, ".git"), { recursive: true, force: true });
|
|
55
|
-
} catch
|
|
55
|
+
} catch {
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
return false;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// versions.
|
|
63
|
-
var
|
|
62
|
+
// src/versions.js
|
|
63
|
+
var versions = { "fumadocs-core": "14.0.1", "fumadocs-ui": "14.0.1", "fumadocs-mdx": "11.0.0", "@fumadocs/content-collections": "1.1.5" };
|
|
64
64
|
|
|
65
65
|
// ../create-app-versions/package.json
|
|
66
66
|
var package_default = {
|
|
@@ -70,20 +70,20 @@ var package_default = {
|
|
|
70
70
|
description: "Used to track dependency versions in create-fumadocs-app",
|
|
71
71
|
license: "MIT",
|
|
72
72
|
dependencies: {
|
|
73
|
-
"@content-collections/core": "^0.7.
|
|
74
|
-
"@content-collections/mdx": "^0.1.
|
|
75
|
-
"@content-collections/next": "^0.2.
|
|
73
|
+
"@content-collections/core": "^0.7.2",
|
|
74
|
+
"@content-collections/mdx": "^0.1.6",
|
|
75
|
+
"@content-collections/next": "^0.2.3",
|
|
76
76
|
"@types/mdx": "^2.0.13",
|
|
77
|
-
"@types/node": "22.
|
|
78
|
-
"@types/react": "^18.3.
|
|
79
|
-
"@types/react-dom": "^18.3.
|
|
77
|
+
"@types/node": "22.7.8",
|
|
78
|
+
"@types/react": "^18.3.11",
|
|
79
|
+
"@types/react-dom": "^18.3.1",
|
|
80
80
|
autoprefixer: "^10.4.20",
|
|
81
|
-
next: "
|
|
82
|
-
postcss: "^8.4.
|
|
81
|
+
next: "15.0.0",
|
|
82
|
+
postcss: "^8.4.47",
|
|
83
83
|
react: "^18.3.1",
|
|
84
84
|
"react-dom": "^18.3.1",
|
|
85
|
-
tailwindcss: "^3.4.
|
|
86
|
-
typescript: "^5.
|
|
85
|
+
tailwindcss: "^3.4.14",
|
|
86
|
+
typescript: "^5.6.3"
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
|
|
@@ -105,7 +105,7 @@ function getPackageManager() {
|
|
|
105
105
|
function autoInstall(manager, dest) {
|
|
106
106
|
return new Promise((res, reject) => {
|
|
107
107
|
const installProcess = spawn(manager, ["install"], {
|
|
108
|
-
stdio: "
|
|
108
|
+
stdio: "ignore",
|
|
109
109
|
env: {
|
|
110
110
|
...process.env,
|
|
111
111
|
NODE_ENV: "development",
|
|
@@ -195,8 +195,8 @@ function createPackageJson(projectName, { template, tailwindcss }) {
|
|
|
195
195
|
},
|
|
196
196
|
dependencies: {
|
|
197
197
|
next: package_default.dependencies.next,
|
|
198
|
-
"fumadocs-ui":
|
|
199
|
-
"fumadocs-core":
|
|
198
|
+
"fumadocs-ui": versions["fumadocs-ui"],
|
|
199
|
+
"fumadocs-core": versions["fumadocs-core"],
|
|
200
200
|
react: package_default.dependencies.react,
|
|
201
201
|
"react-dom": package_default.dependencies["react-dom"]
|
|
202
202
|
},
|
|
@@ -209,7 +209,7 @@ function createPackageJson(projectName, { template, tailwindcss }) {
|
|
|
209
209
|
};
|
|
210
210
|
if (template === "content-collections") {
|
|
211
211
|
Object.assign(packageJson.dependencies, {
|
|
212
|
-
"@fumadocs/content-collections":
|
|
212
|
+
"@fumadocs/content-collections": versions["@fumadocs/content-collections"],
|
|
213
213
|
"@content-collections/core": package_default.dependencies["@content-collections/core"],
|
|
214
214
|
"@content-collections/mdx": package_default.dependencies["@content-collections/mdx"],
|
|
215
215
|
"@content-collections/next": package_default.dependencies["@content-collections/next"]
|
|
@@ -220,7 +220,7 @@ function createPackageJson(projectName, { template, tailwindcss }) {
|
|
|
220
220
|
postinstall: "fumadocs-mdx"
|
|
221
221
|
});
|
|
222
222
|
Object.assign(packageJson.dependencies, {
|
|
223
|
-
"fumadocs-mdx":
|
|
223
|
+
"fumadocs-mdx": versions["fumadocs-mdx"]
|
|
224
224
|
});
|
|
225
225
|
Object.assign(packageJson.devDependencies, {
|
|
226
226
|
"@types/mdx": package_default.dependencies["@types/mdx"]
|
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": "
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"description": "Create a new documentation site with Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@clack/prompts": "^0.7.0",
|
|
23
23
|
"cross-spawn": "^7.0.3",
|
|
24
|
-
"picocolors": "^1.1.
|
|
24
|
+
"picocolors": "^1.1.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/cross-spawn": "^6.0.6",
|
|
28
|
-
"@types/node": "22.
|
|
28
|
+
"@types/node": "22.7.8",
|
|
29
29
|
"fast-glob": "^3.3.1",
|
|
30
30
|
"eslint-config-custom": "0.0.0",
|
|
31
31
|
"tsconfig": "0.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { HomeLayout } from 'fumadocs-ui/home
|
|
3
|
-
import { baseOptions } from '
|
|
2
|
+
import { HomeLayout } from 'fumadocs-ui/layouts/home';
|
|
3
|
+
import { baseOptions } from '@/app/layout.config';
|
|
4
4
|
|
|
5
5
|
export default function Layout({
|
|
6
6
|
children,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DocsLayout } from 'fumadocs-ui/
|
|
1
|
+
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import { baseOptions } from '
|
|
4
|
-
import { source } from '@/
|
|
3
|
+
import { baseOptions } from '@/app/layout.config';
|
|
4
|
+
import { source } from '@/lib/source';
|
|
5
5
|
|
|
6
6
|
export default function Layout({ children }: { children: ReactNode }) {
|
|
7
7
|
return (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Shared layout configurations
|
|
@@ -7,7 +7,7 @@ import { type HomeLayoutProps } from 'fumadocs-ui/home-layout';
|
|
|
7
7
|
* Home Layout: app/(home)/layout.tsx
|
|
8
8
|
* Docs Layout: app/docs/layout.tsx
|
|
9
9
|
*/
|
|
10
|
-
export const baseOptions:
|
|
10
|
+
export const baseOptions: BaseLayoutProps = {
|
|
11
11
|
nav: {
|
|
12
12
|
title: 'My App',
|
|
13
13
|
},
|
|
@@ -10,7 +10,13 @@ const inter = Inter({
|
|
|
10
10
|
export default function Layout({ children }: { children: ReactNode }) {
|
|
11
11
|
return (
|
|
12
12
|
<html lang="en" className={inter.className} suppressHydrationWarning>
|
|
13
|
-
<body
|
|
13
|
+
<body
|
|
14
|
+
style={{
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
minHeight: '100vh',
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
14
20
|
<RootProvider>{children}</RootProvider>
|
|
15
21
|
</body>
|
|
16
22
|
</html>
|
|
@@ -2,7 +2,7 @@ import Link from 'next/link';
|
|
|
2
2
|
|
|
3
3
|
export default function HomePage() {
|
|
4
4
|
return (
|
|
5
|
-
<main className="flex
|
|
5
|
+
<main className="flex flex-1 flex-col justify-center text-center">
|
|
6
6
|
<h1 className="mb-4 text-2xl font-bold">Hello World</h1>
|
|
7
7
|
<p className="text-fd-muted-foreground">
|
|
8
8
|
You can open{' '}
|
|
@@ -10,7 +10,7 @@ const inter = Inter({
|
|
|
10
10
|
export default function Layout({ children }: { children: ReactNode }) {
|
|
11
11
|
return (
|
|
12
12
|
<html lang="en" className={inter.className} suppressHydrationWarning>
|
|
13
|
-
<body>
|
|
13
|
+
<body className="flex flex-col min-h-screen">
|
|
14
14
|
<RootProvider>{children}</RootProvider>
|
|
15
15
|
</body>
|
|
16
16
|
</html>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { source } from '@/
|
|
1
|
+
import { source } from '@/lib/source';
|
|
2
2
|
import type { Metadata } from 'next';
|
|
3
3
|
import {
|
|
4
4
|
DocsPage,
|
|
@@ -10,7 +10,10 @@ import { notFound } from 'next/navigation';
|
|
|
10
10
|
import { MDXContent } from '@content-collections/mdx/react';
|
|
11
11
|
import defaultMdxComponents from 'fumadocs-ui/mdx';
|
|
12
12
|
|
|
13
|
-
export default function Page(
|
|
13
|
+
export default async function Page(props: {
|
|
14
|
+
params: Promise<{ slug?: string[] }>;
|
|
15
|
+
}) {
|
|
16
|
+
const params = await props.params;
|
|
14
17
|
const page = source.getPage(params.slug);
|
|
15
18
|
if (!page) notFound();
|
|
16
19
|
|
|
@@ -32,7 +35,10 @@ export function generateStaticParams() {
|
|
|
32
35
|
return source.generateParams();
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
export function generateMetadata(
|
|
38
|
+
export async function generateMetadata(props: {
|
|
39
|
+
params: Promise<{ slug?: string[] }>;
|
|
40
|
+
}) {
|
|
41
|
+
const params = await props.params;
|
|
36
42
|
const page = source.getPage(params.slug);
|
|
37
43
|
if (!page) notFound();
|
|
38
44
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { source } from '@/
|
|
2
|
-
import type { Metadata } from 'next';
|
|
1
|
+
import { source } from '@/lib/source';
|
|
3
2
|
import {
|
|
4
3
|
DocsPage,
|
|
5
4
|
DocsBody,
|
|
@@ -9,11 +8,10 @@ import {
|
|
|
9
8
|
import { notFound } from 'next/navigation';
|
|
10
9
|
import defaultMdxComponents from 'fumadocs-ui/mdx';
|
|
11
10
|
|
|
12
|
-
export default async function Page({
|
|
13
|
-
params
|
|
14
|
-
}: {
|
|
15
|
-
params: { slug?: string[] };
|
|
11
|
+
export default async function Page(props: {
|
|
12
|
+
params: Promise<{ slug?: string[] }>;
|
|
16
13
|
}) {
|
|
14
|
+
const params = await props.params;
|
|
17
15
|
const page = source.getPage(params.slug);
|
|
18
16
|
if (!page) notFound();
|
|
19
17
|
|
|
@@ -34,12 +32,15 @@ export async function generateStaticParams() {
|
|
|
34
32
|
return source.generateParams();
|
|
35
33
|
}
|
|
36
34
|
|
|
37
|
-
export function generateMetadata(
|
|
35
|
+
export async function generateMetadata(props: {
|
|
36
|
+
params: Promise<{ slug?: string[] }>;
|
|
37
|
+
}) {
|
|
38
|
+
const params = await props.params;
|
|
38
39
|
const page = source.getPage(params.slug);
|
|
39
40
|
if (!page) notFound();
|
|
40
41
|
|
|
41
42
|
return {
|
|
42
43
|
title: page.data.title,
|
|
43
44
|
description: page.data.description,
|
|
44
|
-
}
|
|
45
|
+
};
|
|
45
46
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { source } from '@/app/source';
|
|
2
|
-
import { createSearchAPI } from 'fumadocs-core/search/server';
|
|
3
|
-
|
|
4
|
-
export const { GET } = createSearchAPI('advanced', {
|
|
5
|
-
indexes: source.getPages().map((page) => ({
|
|
6
|
-
title: page.data.title,
|
|
7
|
-
structuredData: page.data.structuredData,
|
|
8
|
-
id: page.url,
|
|
9
|
-
url: page.url,
|
|
10
|
-
})),
|
|
11
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { source } from '@/app/source';
|
|
2
|
-
import { createSearchAPI } from 'fumadocs-core/search/server';
|
|
3
|
-
|
|
4
|
-
export const { GET } = createSearchAPI('advanced', {
|
|
5
|
-
indexes: source.getPages().map((page) => ({
|
|
6
|
-
title: page.data.title,
|
|
7
|
-
description: page.data.description,
|
|
8
|
-
structuredData: page.data.structuredData,
|
|
9
|
-
id: page.url,
|
|
10
|
-
url: page.url,
|
|
11
|
-
})),
|
|
12
|
-
});
|
|
File without changes
|
|
File without changes
|