create-fumadocs-app 11.3.2 → 12.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.
@@ -15,16 +15,16 @@ var package_default = {
15
15
  "@types/react-dom": "^18.3.0",
16
16
  autoprefixer: "^10.4.19",
17
17
  contentlayer: "^0.3.4",
18
- "fumadocs-contentlayer": "^1.1.29",
19
- "fumadocs-core": "^11.3.2",
20
- "fumadocs-mdx": "^8.2.27",
21
- "fumadocs-ui": "^11.3.2",
18
+ "fumadocs-contentlayer": "^1.1.30",
19
+ "fumadocs-core": "^12.0.0",
20
+ "fumadocs-mdx": "^8.2.28",
21
+ "fumadocs-ui": "^12.0.0",
22
22
  next: "^14.2.3",
23
23
  "next-contentlayer": "^0.3.4",
24
24
  postcss: "^8.4.38",
25
25
  react: "^18.3.1",
26
26
  "react-dom": "^18.3.1",
27
- tailwindcss: "^3.4.3",
27
+ tailwindcss: "^3.4.4",
28
28
  typescript: "^5.4.5"
29
29
  },
30
30
  overrides: {
@@ -79,7 +79,7 @@ async function create(options) {
79
79
  const projectName = path.basename(options.outputDir);
80
80
  const dest = path.resolve(cwd, options.outputDir);
81
81
  await copy(path.join(sourceDir, `template/${options.template}`), dest);
82
- await copy(path.join(sourceDir, `template/+content`), dest, (name) => {
82
+ await copy(path.join(sourceDir, `template/+shared`), dest, (name) => {
83
83
  switch (name) {
84
84
  case "example.gitignore":
85
85
  return ".gitignore";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  create
3
- } from "./chunk-S5WNIVIM.js";
3
+ } from "./chunk-XMI3BWIO.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-S5WNIVIM.js";
6
+ } from "./chunk-XMI3BWIO.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": "11.3.2",
3
+ "version": "12.0.0",
4
4
  "description": "Create a new documentation site with Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -1,10 +1,11 @@
1
1
  import { pageTree } from '../source';
2
2
  import { DocsLayout } from 'fumadocs-ui/layout';
3
3
  import type { ReactNode } from 'react';
4
+ import { baseOptions } from '../layout.config';
4
5
 
5
- export default function RootDocsLayout({ children }: { children: ReactNode }) {
6
+ export default function Layout({ children }: { children: ReactNode }) {
6
7
  return (
7
- <DocsLayout tree={pageTree} nav={{ title: 'My App' }}>
8
+ <DocsLayout tree={pageTree} {...baseOptions}>
8
9
  {children}
9
10
  </DocsLayout>
10
11
  );
@@ -0,0 +1,15 @@
1
+ import { type BaseLayoutProps } from 'fumadocs-ui/layout';
2
+
3
+ // basic configuration here
4
+ export const baseOptions: BaseLayoutProps = {
5
+ nav: {
6
+ title: 'My App',
7
+ },
8
+ links: [
9
+ {
10
+ text: 'Documentation',
11
+ url: '/docs',
12
+ active: 'nested-url',
13
+ },
14
+ ],
15
+ };
@@ -9,7 +9,7 @@ const inter = Inter({
9
9
 
10
10
  export default function Layout({ children }: { children: ReactNode }) {
11
11
  return (
12
- <html lang="en" className={inter.className}>
12
+ <html lang="en" className={inter.className} suppressHydrationWarning>
13
13
  <body>
14
14
  <RootProvider>{children}</RootProvider>
15
15
  </body>
@@ -1,11 +0,0 @@
1
- import { pageTree } from '../source';
2
- import { DocsLayout } from 'fumadocs-ui/layout';
3
- import type { ReactNode } from 'react';
4
-
5
- export default function RootDocsLayout({ children }: { children: ReactNode }) {
6
- return (
7
- <DocsLayout tree={pageTree} nav={{ title: 'My App' }}>
8
- {children}
9
- </DocsLayout>
10
- );
11
- }
@@ -1,18 +0,0 @@
1
- import { RootProvider } from 'fumadocs-ui/provider';
2
- import 'fumadocs-ui/style.css';
3
- import { Inter } from 'next/font/google';
4
- import type { ReactNode } from 'react';
5
-
6
- const inter = Inter({
7
- subsets: ['latin'],
8
- });
9
-
10
- export default function Layout({ children }: { children: ReactNode }) {
11
- return (
12
- <html lang="en" className={inter.className} suppressHydrationWarning>
13
- <body>
14
- <RootProvider>{children}</RootProvider>
15
- </body>
16
- </html>
17
- );
18
- }
@@ -1,38 +0,0 @@
1
- import Link from 'next/link';
2
-
3
- export default function HomePage() {
4
- return (
5
- <main
6
- style={{
7
- height: '100vh',
8
- display: 'flex',
9
- flexDirection: 'column',
10
- textAlign: 'center',
11
- justifyContent: 'center',
12
- }}
13
- >
14
- <h1
15
- style={{
16
- fontSize: '2rem',
17
- fontWeight: 'bold',
18
- marginBottom: '1rem',
19
- }}
20
- >
21
- Hello World
22
- </h1>
23
- <p>
24
- You can open{' '}
25
- <Link
26
- href="/docs"
27
- style={{
28
- fontWeight: '600',
29
- textDecoration: 'underline',
30
- }}
31
- >
32
- /docs
33
- </Link>{' '}
34
- and see the documentation.
35
- </p>
36
- </main>
37
- );
38
- }
File without changes
File without changes