create-fumadocs-app 11.3.2 → 12.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-S5WNIVIM.js → chunk-D47BRJXS.js} +9 -10
- package/dist/create-app.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/template/{contentlayer → +shared}/app/docs/layout.tsx +3 -2
- package/template/+shared/app/layout.config.tsx +15 -0
- package/template/+tailwindcss/app/layout.tsx +1 -1
- package/template/fuma-docs-mdx/app/docs/layout.tsx +0 -11
- package/template/fuma-docs-mdx/app/layout.tsx +0 -18
- package/template/fuma-docs-mdx/app/page.tsx +0 -38
- /package/template/{+content → +shared}/README.md +0 -0
- /package/template/{contentlayer → +shared}/app/layout.tsx +0 -0
- /package/template/{contentlayer → +shared}/app/page.tsx +0 -0
- /package/template/{+content → +shared}/content/docs/index.mdx +0 -0
- /package/template/{+content → +shared}/content/docs/test.mdx +0 -0
- /package/template/{+content → +shared}/example.gitignore +0 -0
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
|
|
5
|
+
// versions.json
|
|
6
|
+
var versions_default = { "fumadocs-core": "12.0.1", "fumadocs-ui": "12.0.1", "fumadocs-mdx": "8.2.29", "fumadocs-contentlayer": "1.1.31" };
|
|
7
|
+
|
|
5
8
|
// ../create-app-versions/package.json
|
|
6
9
|
var package_default = {
|
|
7
10
|
name: "example-versions",
|
|
@@ -15,16 +18,12 @@ var package_default = {
|
|
|
15
18
|
"@types/react-dom": "^18.3.0",
|
|
16
19
|
autoprefixer: "^10.4.19",
|
|
17
20
|
contentlayer: "^0.3.4",
|
|
18
|
-
"fumadocs-contentlayer": "^1.1.29",
|
|
19
|
-
"fumadocs-core": "^11.3.2",
|
|
20
|
-
"fumadocs-mdx": "^8.2.27",
|
|
21
|
-
"fumadocs-ui": "^11.3.2",
|
|
22
21
|
next: "^14.2.3",
|
|
23
22
|
"next-contentlayer": "^0.3.4",
|
|
24
23
|
postcss: "^8.4.38",
|
|
25
24
|
react: "^18.3.1",
|
|
26
25
|
"react-dom": "^18.3.1",
|
|
27
|
-
tailwindcss: "^3.4.
|
|
26
|
+
tailwindcss: "^3.4.4",
|
|
28
27
|
typescript: "^5.4.5"
|
|
29
28
|
},
|
|
30
29
|
overrides: {
|
|
@@ -79,7 +78,7 @@ async function create(options) {
|
|
|
79
78
|
const projectName = path.basename(options.outputDir);
|
|
80
79
|
const dest = path.resolve(cwd, options.outputDir);
|
|
81
80
|
await copy(path.join(sourceDir, `template/${options.template}`), dest);
|
|
82
|
-
await copy(path.join(sourceDir, `template/+
|
|
81
|
+
await copy(path.join(sourceDir, `template/+shared`), dest, (name) => {
|
|
83
82
|
switch (name) {
|
|
84
83
|
case "example.gitignore":
|
|
85
84
|
return ".gitignore";
|
|
@@ -130,8 +129,8 @@ function createPackageJson(projectName, { template, tailwindcss }) {
|
|
|
130
129
|
},
|
|
131
130
|
dependencies: {
|
|
132
131
|
next: package_default.dependencies.next,
|
|
133
|
-
"fumadocs-ui":
|
|
134
|
-
"fumadocs-core":
|
|
132
|
+
"fumadocs-ui": versions_default["fumadocs-ui"],
|
|
133
|
+
"fumadocs-core": versions_default["fumadocs-core"],
|
|
135
134
|
react: package_default.dependencies.react,
|
|
136
135
|
"react-dom": package_default.dependencies["react-dom"]
|
|
137
136
|
},
|
|
@@ -143,7 +142,7 @@ function createPackageJson(projectName, { template, tailwindcss }) {
|
|
|
143
142
|
};
|
|
144
143
|
if (template === "contentlayer") {
|
|
145
144
|
Object.assign(packageJson.dependencies, {
|
|
146
|
-
"fumadocs-contentlayer":
|
|
145
|
+
"fumadocs-contentlayer": versions_default["fumadocs-contentlayer"],
|
|
147
146
|
contentlayer: package_default.dependencies.contentlayer,
|
|
148
147
|
"next-contentlayer": package_default.dependencies["next-contentlayer"]
|
|
149
148
|
});
|
|
@@ -153,7 +152,7 @@ function createPackageJson(projectName, { template, tailwindcss }) {
|
|
|
153
152
|
}
|
|
154
153
|
if (template === "fuma-docs-mdx") {
|
|
155
154
|
Object.assign(packageJson.dependencies, {
|
|
156
|
-
"fumadocs-mdx":
|
|
155
|
+
"fumadocs-mdx": versions_default["fumadocs-mdx"]
|
|
157
156
|
});
|
|
158
157
|
Object.assign(packageJson.devDependencies, {
|
|
159
158
|
"@types/mdx": package_default.dependencies["@types/mdx"]
|
package/dist/create-app.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { pageTree } from '../source';
|
|
2
2
|
import { DocsLayout } from 'fumadocs-ui/layout';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
|
+
import { baseOptions } from '../layout.config';
|
|
4
5
|
|
|
5
|
-
export default function
|
|
6
|
+
export default function Layout({ children }: { children: ReactNode }) {
|
|
6
7
|
return (
|
|
7
|
-
<DocsLayout tree={pageTree}
|
|
8
|
+
<DocsLayout tree={pageTree} {...baseOptions}>
|
|
8
9
|
{children}
|
|
9
10
|
</DocsLayout>
|
|
10
11
|
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type BaseLayoutProps } from 'fumadocs-ui/layout';
|
|
2
|
+
|
|
3
|
+
// basic configuration here
|
|
4
|
+
export const baseOptions: BaseLayoutProps = {
|
|
5
|
+
nav: {
|
|
6
|
+
title: 'My App',
|
|
7
|
+
},
|
|
8
|
+
links: [
|
|
9
|
+
{
|
|
10
|
+
text: 'Documentation',
|
|
11
|
+
url: '/docs',
|
|
12
|
+
active: 'nested-url',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
};
|
|
@@ -9,7 +9,7 @@ const inter = Inter({
|
|
|
9
9
|
|
|
10
10
|
export default function Layout({ children }: { children: ReactNode }) {
|
|
11
11
|
return (
|
|
12
|
-
<html lang="en" className={inter.className}>
|
|
12
|
+
<html lang="en" className={inter.className} suppressHydrationWarning>
|
|
13
13
|
<body>
|
|
14
14
|
<RootProvider>{children}</RootProvider>
|
|
15
15
|
</body>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { pageTree } from '../source';
|
|
2
|
-
import { DocsLayout } from 'fumadocs-ui/layout';
|
|
3
|
-
import type { ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
export default function RootDocsLayout({ children }: { children: ReactNode }) {
|
|
6
|
-
return (
|
|
7
|
-
<DocsLayout tree={pageTree} nav={{ title: 'My App' }}>
|
|
8
|
-
{children}
|
|
9
|
-
</DocsLayout>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { RootProvider } from 'fumadocs-ui/provider';
|
|
2
|
-
import 'fumadocs-ui/style.css';
|
|
3
|
-
import { Inter } from 'next/font/google';
|
|
4
|
-
import type { ReactNode } from 'react';
|
|
5
|
-
|
|
6
|
-
const inter = Inter({
|
|
7
|
-
subsets: ['latin'],
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export default function Layout({ children }: { children: ReactNode }) {
|
|
11
|
-
return (
|
|
12
|
-
<html lang="en" className={inter.className} suppressHydrationWarning>
|
|
13
|
-
<body>
|
|
14
|
-
<RootProvider>{children}</RootProvider>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import Link from 'next/link';
|
|
2
|
-
|
|
3
|
-
export default function HomePage() {
|
|
4
|
-
return (
|
|
5
|
-
<main
|
|
6
|
-
style={{
|
|
7
|
-
height: '100vh',
|
|
8
|
-
display: 'flex',
|
|
9
|
-
flexDirection: 'column',
|
|
10
|
-
textAlign: 'center',
|
|
11
|
-
justifyContent: 'center',
|
|
12
|
-
}}
|
|
13
|
-
>
|
|
14
|
-
<h1
|
|
15
|
-
style={{
|
|
16
|
-
fontSize: '2rem',
|
|
17
|
-
fontWeight: 'bold',
|
|
18
|
-
marginBottom: '1rem',
|
|
19
|
-
}}
|
|
20
|
-
>
|
|
21
|
-
Hello World
|
|
22
|
-
</h1>
|
|
23
|
-
<p>
|
|
24
|
-
You can open{' '}
|
|
25
|
-
<Link
|
|
26
|
-
href="/docs"
|
|
27
|
-
style={{
|
|
28
|
-
fontWeight: '600',
|
|
29
|
-
textDecoration: 'underline',
|
|
30
|
-
}}
|
|
31
|
-
>
|
|
32
|
-
/docs
|
|
33
|
-
</Link>{' '}
|
|
34
|
-
and see the documentation.
|
|
35
|
-
</p>
|
|
36
|
-
</main>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|