create-fumadocs-app 13.4.10 → 14.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.
@@ -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 (e) {
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.json
63
- var versions_default = { "fumadocs-core": "13.4.10", "fumadocs-ui": "13.4.10", "fumadocs-mdx": "10.0.2", "@fumadocs/content-collections": "1.1.4" };
62
+ // src/versions.js
63
+ var versions = { "fumadocs-core": "14.0.0", "fumadocs-ui": "14.0.0", "fumadocs-mdx": "10.1.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.0",
74
- "@content-collections/mdx": "^0.1.3",
75
- "@content-collections/next": "^0.2.0",
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.5.4",
78
- "@types/react": "^18.3.5",
79
- "@types/react-dom": "^18.3.0",
77
+ "@types/node": "22.7.7",
78
+ "@types/react": "^18.3.11",
79
+ "@types/react-dom": "^18.3.1",
80
80
  autoprefixer: "^10.4.20",
81
- next: "^14.2.8",
82
- postcss: "^8.4.45",
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.10",
86
- typescript: "^5.5.4"
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: "inherit",
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": versions_default["fumadocs-ui"],
199
- "fumadocs-core": versions_default["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": versions_default["@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": versions_default["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"]
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  create
3
- } from "./chunk-BMGPWUX5.js";
3
+ } from "./chunk-ORTFXTWN.js";
4
4
  export {
5
5
  create
6
6
  };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  create,
4
4
  cwd,
5
5
  getPackageManager
6
- } from "./chunk-BMGPWUX5.js";
6
+ } from "./chunk-ORTFXTWN.js";
7
7
 
8
8
  // src/index.ts
9
9
  import { existsSync } from "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fumadocs-app",
3
- "version": "13.4.10",
3
+ "version": "14.0.0",
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.0"
24
+ "picocolors": "^1.1.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/cross-spawn": "^6.0.6",
28
- "@types/node": "22.5.4",
28
+ "@types/node": "22.7.7",
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-layout';
3
- import { baseOptions } from '../layout.config';
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,
@@ -4,7 +4,7 @@ export default function HomePage() {
4
4
  return (
5
5
  <main
6
6
  style={{
7
- height: '100vh',
7
+ flex: 1,
8
8
  display: 'flex',
9
9
  flexDirection: 'column',
10
10
  textAlign: 'center',
@@ -0,0 +1,4 @@
1
+ import { source } from '@/lib/source';
2
+ import { createFromSource } from 'fumadocs-core/search/server';
3
+
4
+ export const { GET } = createFromSource(source);
@@ -1,7 +1,7 @@
1
- import { DocsLayout } from 'fumadocs-ui/layout';
1
+ import { DocsLayout } from 'fumadocs-ui/layouts/docs';
2
2
  import type { ReactNode } from 'react';
3
- import { baseOptions } from '../layout.config';
4
- import { source } from '@/app/source';
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 { type HomeLayoutProps } from 'fumadocs-ui/home-layout';
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: HomeLayoutProps = {
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 h-screen flex-col justify-center text-center">
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 '@/app/source';
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({ params }: { params: { slug?: string[] } }) {
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({ params }: { params: { slug?: string[] } }) {
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 '@/app/source';
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({ params }: { params: { slug?: string[] } }) {
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
- } satisfies Metadata;
45
+ };
45
46
  }
@@ -1,5 +1,7 @@
1
1
  import { defineDocs, defineConfig } from 'fumadocs-mdx/config';
2
2
 
3
- export const { docs, meta } = defineDocs();
3
+ export const { docs, meta } = defineDocs({
4
+ dir: 'content/docs',
5
+ });
4
6
 
5
7
  export default defineConfig();
@@ -10,7 +10,7 @@
10
10
  "noEmit": true,
11
11
  "esModuleInterop": true,
12
12
  "module": "esnext",
13
- "moduleResolution": "node",
13
+ "moduleResolution": "bundler",
14
14
  "resolveJsonModule": true,
15
15
  "isolatedModules": true,
16
16
  "jsx": "preserve",
@@ -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