create-fumadocs-app 13.4.0 → 13.4.2

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.
@@ -60,7 +60,7 @@ function tryGitInit(root) {
60
60
  }
61
61
 
62
62
  // versions.json
63
- var versions_default = { "fumadocs-core": "13.4.0", "fumadocs-ui": "13.4.0", "fumadocs-mdx": "9.0.3", "@fumadocs/content-collections": "1.1.2" };
63
+ var versions_default = { "fumadocs-core": "13.4.2", "fumadocs-ui": "13.4.2", "fumadocs-mdx": "10.0.0", "@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.3.0",
78
- "@types/react": "^18.3.3",
77
+ "@types/node": "22.5.2",
78
+ "@types/react": "^18.3.5",
79
79
  "@types/react-dom": "^18.3.0",
80
80
  autoprefixer: "^10.4.20",
81
- next: "^14.2.5",
82
- postcss: "^8.4.41",
81
+ next: "^14.2.7",
82
+ postcss: "^8.4.42",
83
83
  react: "^18.3.1",
84
84
  "react-dom": "^18.3.1",
85
85
  tailwindcss: "^3.4.10",
@@ -216,6 +216,9 @@ function createPackageJson(projectName, { template, tailwindcss }) {
216
216
  });
217
217
  }
218
218
  if (template === "fuma-docs-mdx") {
219
+ Object.assign(packageJson.scripts, {
220
+ postinstall: "fumadocs-mdx"
221
+ });
219
222
  Object.assign(packageJson.dependencies, {
220
223
  "fumadocs-mdx": versions_default["fumadocs-mdx"]
221
224
  });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  create
3
- } from "./chunk-YYPU6ANP.js";
3
+ } from "./chunk-RECYQEEL.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-YYPU6ANP.js";
6
+ } from "./chunk-RECYQEEL.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.0",
3
+ "version": "13.4.2",
4
4
  "description": "Create a new documentation site with Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/cross-spawn": "^6.0.6",
28
- "@types/node": "22.3.0",
28
+ "@types/node": "22.5.2",
29
29
  "fast-glob": "^3.3.1",
30
30
  "eslint-config-custom": "0.0.0",
31
31
  "tsconfig": "0.0.0"
@@ -4,7 +4,7 @@ import { createSearchAPI } from 'fumadocs-core/search/server';
4
4
  export const { GET } = createSearchAPI('advanced', {
5
5
  indexes: getPages().map((page) => ({
6
6
  title: page.data.title,
7
- structuredData: page.data.exports.structuredData,
7
+ structuredData: page.data.structuredData,
8
8
  id: page.url,
9
9
  url: page.url,
10
10
  })),
@@ -7,6 +7,7 @@ import {
7
7
  DocsTitle,
8
8
  } from 'fumadocs-ui/page';
9
9
  import { notFound } from 'next/navigation';
10
+ import defaultComponents from 'fumadocs-ui/mdx';
10
11
 
11
12
  export default async function Page({
12
13
  params,
@@ -14,19 +15,16 @@ export default async function Page({
14
15
  params: { slug?: string[] };
15
16
  }) {
16
17
  const page = getPage(params.slug);
18
+ if (!page) notFound();
17
19
 
18
- if (page == null) {
19
- notFound();
20
- }
21
-
22
- const MDX = page.data.exports.default;
20
+ const MDX = page.data.body;
23
21
 
24
22
  return (
25
- <DocsPage toc={page.data.exports.toc} full={page.data.full}>
23
+ <DocsPage toc={page.data.toc} full={page.data.full}>
26
24
  <DocsTitle>{page.data.title}</DocsTitle>
27
25
  <DocsDescription>{page.data.description}</DocsDescription>
28
26
  <DocsBody>
29
- <MDX />
27
+ <MDX componens={defaultComponents} />
30
28
  </DocsBody>
31
29
  </DocsPage>
32
30
  );
@@ -40,8 +38,7 @@ export async function generateStaticParams() {
40
38
 
41
39
  export function generateMetadata({ params }: { params: { slug?: string[] } }) {
42
40
  const page = getPage(params.slug);
43
-
44
- if (page == null) notFound();
41
+ if (!page) notFound();
45
42
 
46
43
  return {
47
44
  title: page.data.title,
@@ -1,9 +1,8 @@
1
- import { map } from '@/.map';
1
+ import { docs, meta } from '@/.source';
2
2
  import { createMDXSource } from 'fumadocs-mdx';
3
3
  import { loader } from 'fumadocs-core/source';
4
4
 
5
5
  export const { getPage, getPages, pageTree } = loader({
6
6
  baseUrl: '/docs',
7
- rootDir: 'docs',
8
- source: createMDXSource(map),
7
+ source: createMDXSource(docs, meta),
9
8
  });
@@ -1,4 +1,4 @@
1
- import createMDX from 'fumadocs-mdx/config';
1
+ import { createMDX } from 'fumadocs-mdx/next';
2
2
 
3
3
  const withMDX = createMDX();
4
4
 
@@ -0,0 +1,5 @@
1
+ import { defineDocs, defineConfig } from 'fumadocs-mdx/config';
2
+
3
+ export const { docs, meta } = defineDocs();
4
+
5
+ export default defineConfig();
@@ -1,9 +0,0 @@
1
- import type { MDXComponents } from 'mdx/types';
2
- import defaultComponents from 'fumadocs-ui/mdx';
3
-
4
- export function useMDXComponents(components: MDXComponents): MDXComponents {
5
- return {
6
- ...defaultComponents,
7
- ...components,
8
- };
9
- }