create-fumadocs-app 15.0.17 → 15.0.18

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
  // src/versions.js
63
- var versions = { "fumadocs-core": "15.0.17", "fumadocs-ui": "15.0.17", "fumadocs-mdx": "11.5.6", "@fumadocs/content-collections": "1.1.8" };
63
+ var versions = { "fumadocs-core": "15.0.18", "fumadocs-ui": "15.0.18", "fumadocs-mdx": "11.5.6", "@fumadocs/content-collections": "1.1.8" };
64
64
 
65
65
  // ../create-app-versions/package.json
66
66
  var package_default = {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  create
3
- } from "./chunk-MYRNFLTK.js";
3
+ } from "./chunk-LD4E25A6.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-MYRNFLTK.js";
6
+ } from "./chunk-LD4E25A6.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": "15.0.17",
3
+ "version": "15.0.18",
4
4
  "description": "Create a new documentation site with Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -8,7 +8,7 @@ import {
8
8
  } from 'fumadocs-ui/page';
9
9
  import { notFound } from 'next/navigation';
10
10
  import { MDXContent } from '@content-collections/mdx/react';
11
- import defaultMdxComponents from 'fumadocs-ui/mdx';
11
+ import defaultMdxComponents, { createRelativeLink } from 'fumadocs-ui/mdx';
12
12
 
13
13
  export default async function Page(props: {
14
14
  params: Promise<{ slug?: string[] }>;
@@ -24,7 +24,12 @@ export default async function Page(props: {
24
24
  <DocsBody>
25
25
  <MDXContent
26
26
  code={page.data.body}
27
- components={{ ...defaultMdxComponents }}
27
+ components={{
28
+ ...defaultMdxComponents,
29
+ // this allows you to link to other pages with relative file paths
30
+ a: createRelativeLink(source, page),
31
+ // you can add other MDX components here
32
+ }}
28
33
  />
29
34
  </DocsBody>
30
35
  </DocsPage>
@@ -6,7 +6,7 @@ import {
6
6
  DocsTitle,
7
7
  } from 'fumadocs-ui/page';
8
8
  import { notFound } from 'next/navigation';
9
- import defaultMdxComponents from 'fumadocs-ui/mdx';
9
+ import defaultMdxComponents, { createRelativeLink } from 'fumadocs-ui/mdx';
10
10
 
11
11
  export default async function Page(props: {
12
12
  params: Promise<{ slug?: string[] }>;
@@ -15,14 +15,21 @@ export default async function Page(props: {
15
15
  const page = source.getPage(params.slug);
16
16
  if (!page) notFound();
17
17
 
18
- const MDX = page.data.body;
18
+ const MDXContent = page.data.body;
19
19
 
20
20
  return (
21
21
  <DocsPage toc={page.data.toc} full={page.data.full}>
22
22
  <DocsTitle>{page.data.title}</DocsTitle>
23
23
  <DocsDescription>{page.data.description}</DocsDescription>
24
24
  <DocsBody>
25
- <MDX components={{ ...defaultMdxComponents }} />
25
+ <MDXContent
26
+ components={{
27
+ ...defaultMdxComponents,
28
+ // this allows you to link to other pages with relative file paths
29
+ a: createRelativeLink(source, page),
30
+ // you can add other MDX components here
31
+ }}
32
+ />
26
33
  </DocsBody>
27
34
  </DocsPage>
28
35
  );