create-fumadocs-app 15.6.11 → 15.7.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.
Files changed (28) hide show
  1. package/dist/{chunk-RNO7V4AN.js → chunk-KMGKLFKY.js} +16 -16
  2. package/dist/create-app.js +1 -1
  3. package/dist/index.js +1 -1
  4. package/package.json +4 -4
  5. package/template/+next/README.md +1 -1
  6. package/template/+next/app/(home)/layout.tsx +3 -4
  7. package/template/+next/app/docs/layout.tsx +3 -4
  8. package/template/+next/app/layout.tsx +1 -2
  9. package/template/+next/lib/layout.shared.tsx +30 -0
  10. package/template/+next+content-collections/app/docs/[[...slug]]/page.tsx +7 -8
  11. package/template/+next+fuma-docs-mdx/README.md +1 -1
  12. package/template/+next+fuma-docs-mdx/app/docs/[[...slug]]/page.tsx +6 -8
  13. package/template/+next+fuma-docs-mdx/source.config.ts +1 -1
  14. package/template/+next+tailwindcss/app/layout.tsx +1 -2
  15. package/template/react-router/app/docs/page.tsx +3 -7
  16. package/template/react-router/app/docs/search.ts +1 -0
  17. package/template/react-router/app/lib/layout.shared.tsx +9 -0
  18. package/template/react-router/app/routes/home.tsx +2 -5
  19. package/template/tanstack-start/src/lib/layout.shared.tsx +9 -0
  20. package/template/tanstack-start/src/router.tsx +1 -1
  21. package/template/tanstack-start/src/routes/__root.tsx +1 -1
  22. package/template/tanstack-start/src/routes/api/search.ts +5 -2
  23. package/template/tanstack-start/src/routes/docs/$.tsx +3 -7
  24. package/template/tanstack-start/src/routes/index.tsx +2 -6
  25. package/template/tanstack-start/tsconfig.json +1 -1
  26. package/template/tanstack-start/vite.config.ts +3 -0
  27. package/template/+next/app/layout.config.tsx +0 -28
  28. /package/template/react-router/app/{source.ts → lib/source.ts} +0 -0
@@ -59,7 +59,7 @@ async function tryGitInit(cwd2) {
59
59
  }
60
60
 
61
61
  // src/versions.js
62
- var versions = { "fumadocs-core": "15.6.11", "fumadocs-ui": "15.6.11", "fumadocs-mdx": "11.7.5", "@fumadocs/mdx-remote": "1.4.0", "@fumadocs/content-collections": "1.2.1" };
62
+ var versions = { "fumadocs-core": "15.7.0", "fumadocs-ui": "15.7.0", "fumadocs-mdx": "11.8.0", "@fumadocs/mdx-remote": "1.4.0", "@fumadocs/content-collections": "1.2.1" };
63
63
 
64
64
  // ../create-app-versions/package.json
65
65
  var package_default = {
@@ -72,32 +72,32 @@ var package_default = {
72
72
  "@content-collections/core": "^0.10.0",
73
73
  "@content-collections/mdx": "^0.2.2",
74
74
  "@content-collections/next": "^0.2.6",
75
- "@react-router/dev": "^7.8.0",
76
- "@react-router/node": "^7.8.0",
77
- "@react-router/serve": "^7.8.0",
78
- "@tailwindcss/postcss": "^4.1.11",
79
- "@tailwindcss/vite": "^4.1.11",
80
- "@tanstack/react-router": "^1.131.7",
81
- "@tanstack/react-start": "^1.131.7",
75
+ "@react-router/dev": "^7.8.1",
76
+ "@react-router/node": "^7.8.1",
77
+ "@react-router/serve": "^7.8.1",
78
+ "@tailwindcss/postcss": "^4.1.12",
79
+ "@tailwindcss/vite": "^4.1.12",
80
+ "@tanstack/react-router": "^1.131.27",
81
+ "@tanstack/react-start": "^1.131.27",
82
82
  "@types/mdx": "^2.0.13",
83
- "@types/node": "24.2.1",
83
+ "@types/node": "24.3.0",
84
84
  "@types/react": "^19.1.10",
85
85
  "@types/react-dom": "^19.1.7",
86
- "@vitejs/plugin-react": "^5.0.0",
86
+ "@vitejs/plugin-react": "^5.0.1",
87
87
  "gray-matter": "^4.0.3",
88
- isbot: "^5.1.29",
89
- next: "15.4.6",
88
+ isbot: "^5.1.30",
89
+ next: "15.5.0",
90
90
  postcss: "^8.5.6",
91
91
  react: "^19.1.1",
92
92
  "react-dom": "^19.1.1",
93
- "react-router": "^7.8.0",
93
+ "react-router": "^7.8.1",
94
94
  "react-router-devtools": "^5.0.6",
95
- shiki: "^3.9.2",
96
- tailwindcss: "^4.1.11",
95
+ shiki: "^3.11.0",
96
+ tailwindcss: "^4.1.12",
97
97
  tinyglobby: "^0.2.14",
98
98
  typescript: "^5.9.2",
99
99
  vinxi: "^0.5.8",
100
- vite: "^7.1.2",
100
+ vite: "^7.1.3",
101
101
  "vite-tsconfig-paths": "^5.1.4"
102
102
  }
103
103
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  create,
3
3
  templates
4
- } from "./chunk-RNO7V4AN.js";
4
+ } from "./chunk-KMGKLFKY.js";
5
5
  export {
6
6
  create,
7
7
  templates
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  getPackageManager,
6
6
  managers,
7
7
  templates
8
- } from "./chunk-RNO7V4AN.js";
8
+ } from "./chunk-KMGKLFKY.js";
9
9
 
10
10
  // src/index.ts
11
11
  import fs from "fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fumadocs-app",
3
- "version": "15.6.11",
3
+ "version": "15.7.0",
4
4
  "description": "Create a new documentation site with Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/cross-spawn": "^6.0.6",
31
- "@types/node": "24.2.1",
31
+ "@types/node": "24.3.0",
32
32
  "tinyglobby": "^0.2.14",
33
33
  "typescript": "^5.9.2",
34
- "eslint-config-custom": "0.0.0",
35
- "tsconfig": "0.0.0"
34
+ "tsconfig": "0.0.0",
35
+ "eslint-config-custom": "0.0.0"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=18.17.0"
@@ -18,7 +18,7 @@ Open http://localhost:3000 with your browser to see the result.
18
18
  In the project, you can see:
19
19
 
20
20
  - `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
21
- - `app/layout.config.tsx`: Shared options for layouts, optional but preferred to keep.
21
+ - `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.
22
22
 
23
23
  | Route | Description |
24
24
  | ------------------------- | ------------------------------------------------------ |
@@ -1,7 +1,6 @@
1
- import type { ReactNode } from 'react';
2
1
  import { HomeLayout } from 'fumadocs-ui/layouts/home';
3
- import { baseOptions } from '@/app/layout.config';
2
+ import { baseOptions } from '@/lib/layout.shared';
4
3
 
5
- export default function Layout({ children }: { children: ReactNode }) {
6
- return <HomeLayout {...baseOptions}>{children}</HomeLayout>;
4
+ export default function Layout({ children }: LayoutProps<'/'>) {
5
+ return <HomeLayout {...baseOptions()}>{children}</HomeLayout>;
7
6
  }
@@ -1,11 +1,10 @@
1
1
  import { DocsLayout } from 'fumadocs-ui/layouts/docs';
2
- import type { ReactNode } from 'react';
3
- import { baseOptions } from '@/app/layout.config';
2
+ import { baseOptions } from '@/lib/layout.shared';
4
3
  import { source } from '@/lib/source';
5
4
 
6
- export default function Layout({ children }: { children: ReactNode }) {
5
+ export default function Layout({ children }: LayoutProps<'/docs'>) {
7
6
  return (
8
- <DocsLayout tree={source.pageTree} {...baseOptions}>
7
+ <DocsLayout tree={source.pageTree} {...baseOptions()}>
9
8
  {children}
10
9
  </DocsLayout>
11
10
  );
@@ -1,13 +1,12 @@
1
1
  import { RootProvider } from 'fumadocs-ui/provider';
2
2
  import 'fumadocs-ui/style.css';
3
3
  import { Inter } from 'next/font/google';
4
- import type { ReactNode } from 'react';
5
4
 
6
5
  const inter = Inter({
7
6
  subsets: ['latin'],
8
7
  });
9
8
 
10
- export default function Layout({ children }: { children: ReactNode }) {
9
+ export default function Layout({ children }: LayoutProps<'/'>) {
11
10
  return (
12
11
  <html lang="en" className={inter.className} suppressHydrationWarning>
13
12
  <body
@@ -0,0 +1,30 @@
1
+ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
2
+
3
+ /**
4
+ * Shared layout configurations
5
+ *
6
+ * you can customise layouts individually from:
7
+ * Home Layout: app/(home)/layout.tsx
8
+ * Docs Layout: app/docs/layout.tsx
9
+ */
10
+ export function baseOptions(): BaseLayoutProps {
11
+ return {
12
+ nav: {
13
+ title: (
14
+ <>
15
+ <svg
16
+ width="24"
17
+ height="24"
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ aria-label="Logo"
20
+ >
21
+ <circle cx={12} cy={12} r={12} fill="currentColor" />
22
+ </svg>
23
+ My App
24
+ </>
25
+ ),
26
+ },
27
+ // see https://fumadocs.dev/docs/ui/navigation/links
28
+ links: [],
29
+ };
30
+ }
@@ -1,18 +1,17 @@
1
1
  import { source } from '@/lib/source';
2
+ import type { Metadata } from 'next';
2
3
  import {
3
- DocsPage,
4
4
  DocsBody,
5
- DocsTitle,
6
5
  DocsDescription,
6
+ DocsPage,
7
+ DocsTitle,
7
8
  } from 'fumadocs-ui/page';
8
9
  import { notFound } from 'next/navigation';
9
10
  import { MDXContent } from '@content-collections/mdx/react';
10
11
  import { createRelativeLink } from 'fumadocs-ui/mdx';
11
12
  import { getMDXComponents } from '@/mdx-components';
12
13
 
13
- export default async function Page(props: {
14
- params: Promise<{ slug?: string[] }>;
15
- }) {
14
+ export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
16
15
  const params = await props.params;
17
16
  const page = source.getPage(params.slug);
18
17
  if (!page) notFound();
@@ -38,9 +37,9 @@ export function generateStaticParams() {
38
37
  return source.generateParams();
39
38
  }
40
39
 
41
- export async function generateMetadata(props: {
42
- params: Promise<{ slug?: string[] }>;
43
- }) {
40
+ export async function generateMetadata(
41
+ props: PageProps<'/docs/[[...slug]]'>,
42
+ ): Promise<Metadata> {
44
43
  const params = await props.params;
45
44
  const page = source.getPage(params.slug);
46
45
  if (!page) notFound();
@@ -18,7 +18,7 @@ Open http://localhost:3000 with your browser to see the result.
18
18
  In the project, you can see:
19
19
 
20
20
  - `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
21
- - `app/layout.config.tsx`: Shared options for layouts, optional but preferred to keep.
21
+ - `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.
22
22
 
23
23
  | Route | Description |
24
24
  | ------------------------- | ------------------------------------------------------ |
@@ -1,18 +1,16 @@
1
1
  import { source } from '@/lib/source';
2
2
  import {
3
- DocsPage,
4
3
  DocsBody,
5
4
  DocsDescription,
5
+ DocsPage,
6
6
  DocsTitle,
7
7
  } from 'fumadocs-ui/page';
8
- import { Metadata } from 'next';
8
+ import type { Metadata } from 'next';
9
9
  import { notFound } from 'next/navigation';
10
10
  import { createRelativeLink } from 'fumadocs-ui/mdx';
11
11
  import { getMDXComponents } from '@/mdx-components';
12
12
 
13
- export default async function Page(props: {
14
- params: Promise<{ slug?: string[] }>;
15
- }) {
13
+ export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
16
14
  const params = await props.params;
17
15
  const page = source.getPage(params.slug);
18
16
  if (!page) notFound();
@@ -39,9 +37,9 @@ export async function generateStaticParams() {
39
37
  return source.generateParams();
40
38
  }
41
39
 
42
- export async function generateMetadata(props: {
43
- params: Promise<{ slug?: string[] }>;
44
- }): Promise<Metadata> {
40
+ export async function generateMetadata(
41
+ props: PageProps<'/docs/[[...slug]]'>,
42
+ ): Promise<Metadata> {
45
43
  const params = await props.params;
46
44
  const page = source.getPage(params.slug);
47
45
  if (!page) notFound();
@@ -6,7 +6,7 @@ import {
6
6
  } from 'fumadocs-mdx/config';
7
7
 
8
8
  // You can customise Zod schemas for frontmatter and `meta.json` here
9
- // see https://fumadocs.vercel.app/docs/mdx/collections#define-docs
9
+ // see https://fumadocs.dev/docs/mdx/collections#define-docs
10
10
  export const docs = defineDocs({
11
11
  docs: {
12
12
  schema: frontmatterSchema,
@@ -1,13 +1,12 @@
1
1
  import '@/app/global.css';
2
2
  import { RootProvider } from 'fumadocs-ui/provider';
3
3
  import { Inter } from 'next/font/google';
4
- import type { ReactNode } from 'react';
5
4
 
6
5
  const inter = Inter({
7
6
  subsets: ['latin'],
8
7
  });
9
8
 
10
- export default function Layout({ children }: { children: ReactNode }) {
9
+ export default function Layout({ children }: LayoutProps<'/'>) {
11
10
  return (
12
11
  <html lang="en" className={inter.className} suppressHydrationWarning>
13
12
  <body className="flex flex-col min-h-screen">
@@ -6,7 +6,8 @@ import {
6
6
  DocsPage,
7
7
  DocsTitle,
8
8
  } from 'fumadocs-ui/page';
9
- import { source } from '@/source';
9
+ import { source } from '@/lib/source';
10
+ import { baseOptions } from '@/lib/layout.shared';
10
11
  import { type PageTree } from 'fumadocs-core/server';
11
12
  import defaultMdxComponents from 'fumadocs-ui/mdx';
12
13
  import { docs } from '../../source.generated';
@@ -45,12 +46,7 @@ export default function Page(props: Route.ComponentProps) {
45
46
  const Content = renderer[path];
46
47
 
47
48
  return (
48
- <DocsLayout
49
- nav={{
50
- title: 'React Router',
51
- }}
52
- tree={tree as PageTree.Root}
53
- >
49
+ <DocsLayout {...baseOptions()} tree={tree as PageTree.Root}>
54
50
  <Content />
55
51
  </DocsLayout>
56
52
  );
@@ -3,6 +3,7 @@ import { createFromSource } from 'fumadocs-core/search/server';
3
3
  import { source } from '@/source';
4
4
 
5
5
  const server = createFromSource(source, {
6
+ // https://docs.orama.com/docs/orama-js/supported-languages
6
7
  language: 'english',
7
8
  });
8
9
 
@@ -0,0 +1,9 @@
1
+ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
2
+
3
+ export function baseOptions(): BaseLayoutProps {
4
+ return {
5
+ nav: {
6
+ title: 'React Router',
7
+ },
8
+ };
9
+ }
@@ -1,6 +1,7 @@
1
1
  import type { Route } from './+types/home';
2
2
  import { HomeLayout } from 'fumadocs-ui/layouts/home';
3
3
  import { Link } from 'react-router';
4
+ import { baseOptions } from '@/lib/layout.shared';
4
5
 
5
6
  export function meta({}: Route.MetaArgs) {
6
7
  return [
@@ -11,11 +12,7 @@ export function meta({}: Route.MetaArgs) {
11
12
 
12
13
  export default function Home() {
13
14
  return (
14
- <HomeLayout
15
- nav={{
16
- title: 'React Router',
17
- }}
18
- >
15
+ <HomeLayout {...baseOptions()}>
19
16
  <div className="p-4 flex flex-col items-center justify-center text-center flex-1">
20
17
  <h1 className="text-xl font-bold mb-2">Fumadocs on React Router.</h1>
21
18
  <p className="text-fd-muted-foreground mb-4">
@@ -0,0 +1,9 @@
1
+ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
2
+
3
+ export function baseOptions(): BaseLayoutProps {
4
+ return {
5
+ nav: {
6
+ title: 'Tanstack Start',
7
+ },
8
+ };
9
+ }
@@ -1,6 +1,6 @@
1
1
  import { createRouter as createTanStackRouter } from '@tanstack/react-router';
2
2
  import { routeTree } from './routeTree.gen';
3
- import { NotFound } from '~/components/not-found';
3
+ import { NotFound } from '@/components/not-found';
4
4
 
5
5
  export function createRouter() {
6
6
  return createTanStackRouter({
@@ -6,7 +6,7 @@ import {
6
6
  Scripts,
7
7
  } from '@tanstack/react-router';
8
8
  import * as React from 'react';
9
- import appCss from '~/styles/app.css?url';
9
+ import appCss from '@/styles/app.css?url';
10
10
  import { RootProvider } from 'fumadocs-ui/provider/base';
11
11
  import { TanstackProvider } from 'fumadocs-core/framework/tanstack';
12
12
 
@@ -1,8 +1,11 @@
1
1
  import { createServerFileRoute } from '@tanstack/react-start/server';
2
- import { source } from '~/lib/source';
2
+ import { source } from '@/lib/source';
3
3
  import { createFromSource } from 'fumadocs-core/search/server';
4
4
 
5
- const server = createFromSource(source);
5
+ const server = createFromSource(source, {
6
+ // https://docs.orama.com/docs/orama-js/supported-languages
7
+ language: 'english',
8
+ });
6
9
 
7
10
  export const ServerRoute = createServerFileRoute('/api/search').methods({
8
11
  GET: async ({ request }) => server.GET(request),
@@ -1,7 +1,7 @@
1
1
  import { createFileRoute, notFound } from '@tanstack/react-router';
2
2
  import { DocsLayout } from 'fumadocs-ui/layouts/docs';
3
3
  import { createServerFn } from '@tanstack/react-start';
4
- import { source } from '~/lib/source';
4
+ import { source } from '@/lib/source';
5
5
  import type { PageTree } from 'fumadocs-core/server';
6
6
  import { useMemo } from 'react';
7
7
  import { docs } from '../../../source.generated';
@@ -13,6 +13,7 @@ import {
13
13
  } from 'fumadocs-ui/page';
14
14
  import defaultMdxComponents from 'fumadocs-ui/mdx';
15
15
  import { createClientLoader } from 'fumadocs-mdx/runtime/vite';
16
+ import { baseOptions } from '@/lib/layout.shared';
16
17
 
17
18
  export const Route = createFileRoute('/docs/$')({
18
19
  component: Page,
@@ -66,12 +67,7 @@ function Page() {
66
67
  );
67
68
 
68
69
  return (
69
- <DocsLayout
70
- tree={tree}
71
- nav={{
72
- title: 'Fumadocs Tanstack',
73
- }}
74
- >
70
+ <DocsLayout {...baseOptions()} tree={tree}>
75
71
  <Content />
76
72
  </DocsLayout>
77
73
  );
@@ -1,5 +1,6 @@
1
1
  import { createFileRoute, Link } from '@tanstack/react-router';
2
2
  import { HomeLayout } from 'fumadocs-ui/layouts/home';
3
+ import { baseOptions } from '@/lib/layout.shared';
3
4
 
4
5
  export const Route = createFileRoute('/')({
5
6
  component: Home,
@@ -7,12 +8,7 @@ export const Route = createFileRoute('/')({
7
8
 
8
9
  function Home() {
9
10
  return (
10
- <HomeLayout
11
- nav={{
12
- title: 'Tanstack Start',
13
- }}
14
- className="text-center py-32 justify-center"
15
- >
11
+ <HomeLayout {...baseOptions()} className="text-center py-32 justify-center">
16
12
  <h1 className="font-medium text-xl mb-4">Fumadocs on Tanstack Start.</h1>
17
13
  <Link
18
14
  to="/docs/$"
@@ -15,7 +15,7 @@
15
15
  "forceConsistentCasingInFileNames": true,
16
16
  "baseUrl": ".",
17
17
  "paths": {
18
- "~/*": ["./src/*"]
18
+ "@/*": ["./src/*"]
19
19
  },
20
20
  "noEmit": true
21
21
  }
@@ -17,6 +17,9 @@ export default defineConfig({
17
17
  }),
18
18
  tanstackStart({
19
19
  customViteReactPlugin: true,
20
+ prerender: {
21
+ enabled: true,
22
+ },
20
23
  }),
21
24
  react(),
22
25
  ],
@@ -1,28 +0,0 @@
1
- import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
2
-
3
- /**
4
- * Shared layout configurations
5
- *
6
- * you can customise layouts individually from:
7
- * Home Layout: app/(home)/layout.tsx
8
- * Docs Layout: app/docs/layout.tsx
9
- */
10
- export const baseOptions: BaseLayoutProps = {
11
- nav: {
12
- title: (
13
- <>
14
- <svg
15
- width="24"
16
- height="24"
17
- xmlns="http://www.w3.org/2000/svg"
18
- aria-label="Logo"
19
- >
20
- <circle cx={12} cy={12} r={12} fill="currentColor" />
21
- </svg>
22
- My App
23
- </>
24
- ),
25
- },
26
- // see https://fumadocs.dev/docs/ui/navigation/links
27
- links: [],
28
- };