create-fumadocs-app 11.3.1 → 12.0.0
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-IMKO6WLP.js → chunk-XMI3BWIO.js} +6 -6
- 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
|
@@ -15,16 +15,16 @@ var package_default = {
|
|
|
15
15
|
"@types/react-dom": "^18.3.0",
|
|
16
16
|
autoprefixer: "^10.4.19",
|
|
17
17
|
contentlayer: "^0.3.4",
|
|
18
|
-
"fumadocs-contentlayer": "^1.1.
|
|
19
|
-
"fumadocs-core": "^
|
|
20
|
-
"fumadocs-mdx": "^8.2.
|
|
21
|
-
"fumadocs-ui": "^
|
|
18
|
+
"fumadocs-contentlayer": "^1.1.30",
|
|
19
|
+
"fumadocs-core": "^12.0.0",
|
|
20
|
+
"fumadocs-mdx": "^8.2.28",
|
|
21
|
+
"fumadocs-ui": "^12.0.0",
|
|
22
22
|
next: "^14.2.3",
|
|
23
23
|
"next-contentlayer": "^0.3.4",
|
|
24
24
|
postcss: "^8.4.38",
|
|
25
25
|
react: "^18.3.1",
|
|
26
26
|
"react-dom": "^18.3.1",
|
|
27
|
-
tailwindcss: "^3.4.
|
|
27
|
+
tailwindcss: "^3.4.4",
|
|
28
28
|
typescript: "^5.4.5"
|
|
29
29
|
},
|
|
30
30
|
overrides: {
|
|
@@ -79,7 +79,7 @@ async function create(options) {
|
|
|
79
79
|
const projectName = path.basename(options.outputDir);
|
|
80
80
|
const dest = path.resolve(cwd, options.outputDir);
|
|
81
81
|
await copy(path.join(sourceDir, `template/${options.template}`), dest);
|
|
82
|
-
await copy(path.join(sourceDir, `template/+
|
|
82
|
+
await copy(path.join(sourceDir, `template/+shared`), dest, (name) => {
|
|
83
83
|
switch (name) {
|
|
84
84
|
case "example.gitignore":
|
|
85
85
|
return ".gitignore";
|
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
|