create-fumadocs-app 13.4.5 → 13.4.7
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-I7YO6DUN.js → chunk-OLXRUPH6.js} +4 -4
- 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 +11 -0
- package/template/+shared/app/docs/layout.tsx +7 -2
- package/template/+shared/app/layout.config.tsx +7 -9
- package/template/content-collections/app/api/search/route.ts +2 -2
- package/template/content-collections/app/docs/[[...slug]]/page.tsx +4 -8
- package/template/content-collections/app/source.ts +1 -1
- package/template/fuma-docs-mdx/app/api/search/route.ts +2 -2
- package/template/fuma-docs-mdx/app/docs/[[...slug]]/page.tsx +6 -8
- package/template/fuma-docs-mdx/app/source.ts +1 -1
- /package/template/+shared/app/{page.tsx → (home)/page.tsx} +0 -0
- /package/template/+tailwindcss/app/{page.tsx → (home)/page.tsx} +0 -0
|
@@ -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.7", "fumadocs-ui": "13.4.7", "fumadocs-mdx": "10.0.1", "@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.5.
|
|
77
|
+
"@types/node": "22.5.4",
|
|
78
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.8",
|
|
82
|
+
postcss: "^8.4.45",
|
|
83
83
|
react: "^18.3.1",
|
|
84
84
|
"react-dom": "^18.3.1",
|
|
85
85
|
tailwindcss: "^3.4.10",
|
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.7",
|
|
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.0
|
|
24
|
+
"picocolors": "^1.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/cross-spawn": "^6.0.6",
|
|
28
|
-
"@types/node": "22.5.
|
|
28
|
+
"@types/node": "22.5.4",
|
|
29
29
|
"fast-glob": "^3.3.1",
|
|
30
30
|
"eslint-config-custom": "0.0.0",
|
|
31
31
|
"tsconfig": "0.0.0"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { HomeLayout } from 'fumadocs-ui/home-layout';
|
|
3
|
+
import { baseOptions } from '../layout.config';
|
|
4
|
+
|
|
5
|
+
export default function Layout({
|
|
6
|
+
children,
|
|
7
|
+
}: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}): React.ReactElement {
|
|
10
|
+
return <HomeLayout {...baseOptions}>{children}</HomeLayout>;
|
|
11
|
+
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { DocsLayout } from 'fumadocs-ui/layout';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { baseOptions } from '../layout.config';
|
|
4
|
+
import { source } from '@/app/source';
|
|
4
5
|
|
|
5
6
|
export default function Layout({ children }: { children: ReactNode }) {
|
|
6
|
-
return
|
|
7
|
+
return (
|
|
8
|
+
<DocsLayout tree={source.pageTree} {...baseOptions}>
|
|
9
|
+
{children}
|
|
10
|
+
</DocsLayout>
|
|
11
|
+
);
|
|
7
12
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { type DocsLayoutProps } from 'fumadocs-ui/layout';
|
|
2
1
|
import { type HomeLayoutProps } from 'fumadocs-ui/home-layout';
|
|
3
|
-
import { pageTree } from '@/app/source';
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Shared layout configurations
|
|
5
|
+
*
|
|
6
|
+
* you can configure layouts individually from:
|
|
7
|
+
* Home Layout: app/(home)/layout.tsx
|
|
8
|
+
* Docs Layout: app/docs/layout.tsx
|
|
9
|
+
*/
|
|
6
10
|
export const baseOptions: HomeLayoutProps = {
|
|
7
11
|
nav: {
|
|
8
12
|
title: 'My App',
|
|
@@ -15,9 +19,3 @@ export const baseOptions: HomeLayoutProps = {
|
|
|
15
19
|
},
|
|
16
20
|
],
|
|
17
21
|
};
|
|
18
|
-
|
|
19
|
-
// docs layout configuration
|
|
20
|
-
export const docsOptions: DocsLayoutProps = {
|
|
21
|
-
...baseOptions,
|
|
22
|
-
tree: pageTree,
|
|
23
|
-
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { source } from '@/app/source';
|
|
2
2
|
import { createSearchAPI } from 'fumadocs-core/search/server';
|
|
3
3
|
|
|
4
4
|
export const { GET } = createSearchAPI('advanced', {
|
|
5
|
-
indexes: getPages().map((page) => ({
|
|
5
|
+
indexes: source.getPages().map((page) => ({
|
|
6
6
|
title: page.data.title,
|
|
7
7
|
structuredData: page.data.structuredData,
|
|
8
8
|
id: page.url,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { source } from '@/app/source';
|
|
2
2
|
import type { Metadata } from 'next';
|
|
3
3
|
import {
|
|
4
4
|
DocsPage,
|
|
@@ -11,8 +11,7 @@ import { MDXContent } from '@content-collections/mdx/react';
|
|
|
11
11
|
import defaultMdxComponents from 'fumadocs-ui/mdx';
|
|
12
12
|
|
|
13
13
|
export default function Page({ params }: { params: { slug?: string[] } }) {
|
|
14
|
-
const page = getPage(params.slug);
|
|
15
|
-
|
|
14
|
+
const page = source.getPage(params.slug);
|
|
16
15
|
if (!page) notFound();
|
|
17
16
|
|
|
18
17
|
return (
|
|
@@ -30,14 +29,11 @@ export default function Page({ params }: { params: { slug?: string[] } }) {
|
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
export function generateStaticParams() {
|
|
33
|
-
return
|
|
34
|
-
slug: page.slugs,
|
|
35
|
-
}));
|
|
32
|
+
return source.generateParams();
|
|
36
33
|
}
|
|
37
34
|
|
|
38
35
|
export function generateMetadata({ params }: { params: { slug?: string[] } }) {
|
|
39
|
-
const page = getPage(params.slug);
|
|
40
|
-
|
|
36
|
+
const page = source.getPage(params.slug);
|
|
41
37
|
if (!page) notFound();
|
|
42
38
|
|
|
43
39
|
return {
|
|
@@ -2,7 +2,7 @@ import { allDocs, allMetas } from 'content-collections';
|
|
|
2
2
|
import { loader } from 'fumadocs-core/source';
|
|
3
3
|
import { createMDXSource } from '@fumadocs/content-collections';
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const source = loader({
|
|
6
6
|
baseUrl: '/docs',
|
|
7
7
|
source: createMDXSource(allDocs, allMetas),
|
|
8
8
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { source } from '@/app/source';
|
|
2
2
|
import { createSearchAPI } from 'fumadocs-core/search/server';
|
|
3
3
|
|
|
4
4
|
export const { GET } = createSearchAPI('advanced', {
|
|
5
|
-
indexes: getPages().map((page) => ({
|
|
5
|
+
indexes: source.getPages().map((page) => ({
|
|
6
6
|
title: page.data.title,
|
|
7
7
|
structuredData: page.data.structuredData,
|
|
8
8
|
id: page.url,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { source } from '@/app/source';
|
|
2
2
|
import type { Metadata } from 'next';
|
|
3
3
|
import {
|
|
4
4
|
DocsPage,
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
DocsTitle,
|
|
8
8
|
} from 'fumadocs-ui/page';
|
|
9
9
|
import { notFound } from 'next/navigation';
|
|
10
|
-
import
|
|
10
|
+
import defaultMdxComponents from 'fumadocs-ui/mdx';
|
|
11
11
|
|
|
12
12
|
export default async function Page({
|
|
13
13
|
params,
|
|
14
14
|
}: {
|
|
15
15
|
params: { slug?: string[] };
|
|
16
16
|
}) {
|
|
17
|
-
const page = getPage(params.slug);
|
|
17
|
+
const page = source.getPage(params.slug);
|
|
18
18
|
if (!page) notFound();
|
|
19
19
|
|
|
20
20
|
const MDX = page.data.body;
|
|
@@ -24,20 +24,18 @@ export default async function Page({
|
|
|
24
24
|
<DocsTitle>{page.data.title}</DocsTitle>
|
|
25
25
|
<DocsDescription>{page.data.description}</DocsDescription>
|
|
26
26
|
<DocsBody>
|
|
27
|
-
<MDX components={
|
|
27
|
+
<MDX components={{ ...defaultMdxComponents }} />
|
|
28
28
|
</DocsBody>
|
|
29
29
|
</DocsPage>
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export async function generateStaticParams() {
|
|
34
|
-
return
|
|
35
|
-
slug: page.slugs,
|
|
36
|
-
}));
|
|
34
|
+
return source.generateParams();
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
export function generateMetadata({ params }: { params: { slug?: string[] } }) {
|
|
40
|
-
const page = getPage(params.slug);
|
|
38
|
+
const page = source.getPage(params.slug);
|
|
41
39
|
if (!page) notFound();
|
|
42
40
|
|
|
43
41
|
return {
|
|
@@ -2,7 +2,7 @@ import { docs, meta } from '@/.source';
|
|
|
2
2
|
import { createMDXSource } from 'fumadocs-mdx';
|
|
3
3
|
import { loader } from 'fumadocs-core/source';
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const source = loader({
|
|
6
6
|
baseUrl: '/docs',
|
|
7
7
|
source: createMDXSource(docs, meta),
|
|
8
8
|
});
|
|
File without changes
|
|
File without changes
|