create-fumadocs-app 16.0.0 → 16.0.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.
Files changed (72) hide show
  1. package/dist/{chunk-KVKS2K3W.js → chunk-6C2B326N.js} +198 -196
  2. package/dist/create-app.d.ts +35 -8
  3. package/dist/create-app.js +3 -5
  4. package/dist/index.js +110 -32
  5. package/package.json +3 -2
  6. package/template/+next+fuma-docs-mdx/app/(home)/page.tsx +16 -0
  7. package/template/{+next+tailwindcss → +next+fuma-docs-mdx}/app/layout.tsx +1 -1
  8. package/template/{+next → +next+fuma-docs-mdx}/example.gitignore +0 -2
  9. package/template/+next+fuma-docs-mdx/lib/layout.shared.tsx +9 -0
  10. package/template/+next+fuma-docs-mdx/lib/source.ts +1 -1
  11. package/template/{+next → +next+fuma-docs-mdx}/mdx-components.tsx +0 -1
  12. package/template/+next+fuma-docs-mdx/package.json +29 -0
  13. package/template/+next+fuma-docs-mdx/source.config.ts +1 -0
  14. package/template/+next+fuma-docs-mdx/tsconfig.json +2 -2
  15. package/template/{+next → +orama-cloud/+next+fuma-docs-mdx}/app/layout.tsx +4 -9
  16. package/template/+orama-cloud/+next+fuma-docs-mdx/app/static.json/route.ts +7 -0
  17. package/template/+orama-cloud/@app/components/search.tsx +59 -0
  18. package/template/+orama-cloud/@app/lib/export-static-indexes.ts +14 -0
  19. package/template/+orama-cloud/@root/.env.example +6 -0
  20. package/template/+orama-cloud/react-router/app/root.tsx +76 -0
  21. package/template/+orama-cloud/react-router/app/routes/static.ts +5 -0
  22. package/template/+orama-cloud/react-router/app/routes.ts +8 -0
  23. package/template/+orama-cloud/react-router-spa/app/root.tsx +76 -0
  24. package/template/+orama-cloud/react-router-spa/app/routes/static.ts +5 -0
  25. package/template/+orama-cloud/react-router-spa/app/routes.ts +8 -0
  26. package/template/+orama-cloud/tanstack-start/src/routes/__root.tsx +51 -0
  27. package/template/+orama-cloud/tanstack-start/src/routes/static[.]json.ts +10 -0
  28. package/template/+orama-cloud/tanstack-start/vite.config.ts +27 -0
  29. package/template/+orama-cloud/waku/src/components/provider.tsx +8 -0
  30. package/template/+orama-cloud/waku/src/pages/api/static.json.ts +9 -0
  31. package/template/react-router/app/docs/page.tsx +4 -4
  32. package/template/react-router/example.gitignore +0 -1
  33. package/template/react-router-spa/README.md +12 -0
  34. package/template/react-router-spa/app/app.css +3 -0
  35. package/template/react-router-spa/app/components/search.tsx +50 -0
  36. package/template/react-router-spa/app/docs/page.tsx +53 -0
  37. package/template/react-router-spa/app/docs/search.ts +10 -0
  38. package/template/react-router-spa/app/lib/layout.shared.tsx +9 -0
  39. package/template/react-router-spa/app/lib/source.ts +7 -0
  40. package/template/react-router-spa/app/root.tsx +76 -0
  41. package/template/react-router-spa/app/routes/home.tsx +30 -0
  42. package/template/react-router-spa/app/routes.ts +7 -0
  43. package/template/react-router-spa/content/docs/index.mdx +32 -0
  44. package/template/react-router-spa/content/docs/test.mdx +24 -0
  45. package/template/react-router-spa/example.gitignore +7 -0
  46. package/template/react-router-spa/package.json +36 -0
  47. package/template/react-router-spa/public/favicon.ico +0 -0
  48. package/template/react-router-spa/react-router.config.ts +18 -0
  49. package/template/react-router-spa/serve.json +3 -0
  50. package/template/react-router-spa/source.config.ts +7 -0
  51. package/template/react-router-spa/tsconfig.json +28 -0
  52. package/template/react-router-spa/vite.config.ts +10 -0
  53. package/template/tanstack-start/example.gitignore +9 -1
  54. package/template/tanstack-start/package.json +6 -6
  55. package/template/waku/example.gitignore +3 -1
  56. package/template/waku/package.json +3 -3
  57. package/template/+next/README.md +0 -37
  58. package/template/+next/app/(home)/page.tsx +0 -42
  59. package/template/+next/lib/layout.shared.tsx +0 -30
  60. package/template/+next+content-collections/app/docs/[[...slug]]/page.tsx +0 -51
  61. package/template/+next+content-collections/content-collections.ts +0 -26
  62. package/template/+next+content-collections/lib/source.ts +0 -8
  63. package/template/+next+content-collections/next.config.mjs +0 -8
  64. package/template/+next+content-collections/tsconfig.json +0 -35
  65. package/template/+next+tailwindcss/app/(home)/page.tsx +0 -19
  66. package/template/{+next → +next+fuma-docs-mdx}/app/(home)/layout.tsx +0 -0
  67. package/template/{+next → +next+fuma-docs-mdx}/app/api/search/route.ts +0 -0
  68. package/template/{+next → +next+fuma-docs-mdx}/app/docs/layout.tsx +1 -1
  69. /package/template/{+next+tailwindcss → +next+fuma-docs-mdx}/app/global.css +0 -0
  70. /package/template/{+next → +next+fuma-docs-mdx}/content/docs/index.mdx +0 -0
  71. /package/template/{+next → +next+fuma-docs-mdx}/content/docs/test.mdx +0 -0
  72. /package/template/{+next+tailwindcss → +next+fuma-docs-mdx}/postcss.config.mjs +0 -0
@@ -18,12 +18,12 @@
18
18
  "waku": "^0.26.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@tailwindcss/vite": "^4.1.14",
21
+ "@tailwindcss/vite": "^4.1.15",
22
22
  "@types/mdx": "^2.0.13",
23
- "@types/node": "^24.8.1",
23
+ "@types/node": "^24.9.1",
24
24
  "@types/react": "^19.2.2",
25
25
  "@types/react-dom": "^19.2.2",
26
- "tailwindcss": "^4.1.14",
26
+ "tailwindcss": "^4.1.15",
27
27
  "typescript": "^5.9.3",
28
28
  "vite": "^7.1.11",
29
29
  "vite-tsconfig-paths": "^5.1.4"
@@ -1,37 +0,0 @@
1
- This is a Next.js application generated with
2
- [Create Fumadocs](https://github.com/fuma-nama/fumadocs).
3
-
4
- Run development server:
5
-
6
- ```bash
7
- npm run dev
8
- # or
9
- pnpm dev
10
- # or
11
- yarn dev
12
- ```
13
-
14
- Open http://localhost:3000 with your browser to see the result.
15
-
16
- ## Explore
17
-
18
- In the project, you can see:
19
-
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
- - `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.
22
-
23
- | Route | Description |
24
- | ------------------------- | ------------------------------------------------------ |
25
- | `app/(home)` | The route group for your landing page and other pages. |
26
- | `app/docs` | The documentation layout and pages. |
27
- | `app/api/search/route.ts` | The Route Handler for search. |
28
-
29
- ## Learn More
30
-
31
- To learn more about Next.js and Fumadocs, take a look at the following
32
- resources:
33
-
34
- - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
35
- features and API.
36
- - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
37
- - [Fumadocs](https://fumadocs.dev) - learn about Fumadocs
@@ -1,42 +0,0 @@
1
- import Link from 'next/link';
2
-
3
- export const metadata = {
4
- title: 'My App',
5
- };
6
-
7
- export default function HomePage() {
8
- return (
9
- <main
10
- style={{
11
- flex: 1,
12
- display: 'flex',
13
- flexDirection: 'column',
14
- textAlign: 'center',
15
- justifyContent: 'center',
16
- }}
17
- >
18
- <h1
19
- style={{
20
- fontSize: '2rem',
21
- fontWeight: 'bold',
22
- marginBottom: '1rem',
23
- }}
24
- >
25
- Hello World
26
- </h1>
27
- <p>
28
- You can open{' '}
29
- <Link
30
- href="/docs"
31
- style={{
32
- fontWeight: '600',
33
- textDecoration: 'underline',
34
- }}
35
- >
36
- /docs
37
- </Link>{' '}
38
- and see the documentation.
39
- </p>
40
- </main>
41
- );
42
- }
@@ -1,30 +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 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,51 +0,0 @@
1
- import { source } from '@/lib/source';
2
- import type { Metadata } from 'next';
3
- import {
4
- DocsBody,
5
- DocsDescription,
6
- DocsPage,
7
- DocsTitle,
8
- } from 'fumadocs-ui/page';
9
- import { notFound } from 'next/navigation';
10
- import { MDXContent } from '@content-collections/mdx/react';
11
- import { createRelativeLink } from 'fumadocs-ui/mdx';
12
- import { getMDXComponents } from '@/mdx-components';
13
-
14
- export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
15
- const params = await props.params;
16
- const page = source.getPage(params.slug);
17
- if (!page) notFound();
18
-
19
- return (
20
- <DocsPage toc={page.data.toc} full={page.data.full}>
21
- <DocsTitle>{page.data.title}</DocsTitle>
22
- <DocsDescription>{page.data.description}</DocsDescription>
23
- <DocsBody>
24
- <MDXContent
25
- code={page.data.body}
26
- components={getMDXComponents({
27
- // this allows you to link to other pages with relative file paths
28
- a: createRelativeLink(source, page),
29
- })}
30
- />
31
- </DocsBody>
32
- </DocsPage>
33
- );
34
- }
35
-
36
- export function generateStaticParams() {
37
- return source.generateParams();
38
- }
39
-
40
- export async function generateMetadata(
41
- props: PageProps<'/docs/[[...slug]]'>,
42
- ): Promise<Metadata> {
43
- const params = await props.params;
44
- const page = source.getPage(params.slug);
45
- if (!page) notFound();
46
-
47
- return {
48
- title: page.data.title,
49
- description: page.data.description,
50
- };
51
- }
@@ -1,26 +0,0 @@
1
- import { defineCollection, defineConfig } from '@content-collections/core';
2
- import {
3
- frontmatterSchema,
4
- metaSchema,
5
- transformMDX,
6
- } from '@fumadocs/content-collections/configuration';
7
-
8
- const docs = defineCollection({
9
- name: 'docs',
10
- directory: 'content/docs',
11
- include: '**/*.mdx',
12
- schema: frontmatterSchema,
13
- transform: transformMDX,
14
- });
15
-
16
- const metas = defineCollection({
17
- name: 'meta',
18
- directory: 'content/docs',
19
- include: '**/meta.json',
20
- parser: 'json',
21
- schema: metaSchema,
22
- });
23
-
24
- export default defineConfig({
25
- collections: [docs, metas],
26
- });
@@ -1,8 +0,0 @@
1
- import { allDocs, allMetas } from 'content-collections';
2
- import { loader } from 'fumadocs-core/source';
3
- import { createMDXSource } from '@fumadocs/content-collections';
4
-
5
- export const source = loader({
6
- baseUrl: '/docs',
7
- source: createMDXSource(allDocs, allMetas),
8
- });
@@ -1,8 +0,0 @@
1
- import { withContentCollections } from '@content-collections/next';
2
-
3
- /** @type {import('next').NextConfig} */
4
- const config = {
5
- reactStrictMode: true,
6
- };
7
-
8
- export default withContentCollections(config);
@@ -1,35 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "target": "ESNext",
5
- "lib": ["dom", "dom.iterable", "esnext"],
6
- "allowJs": true,
7
- "skipLibCheck": true,
8
- "strict": true,
9
- "noEmit": true,
10
- "esModuleInterop": true,
11
- "module": "esnext",
12
- "moduleResolution": "bundler",
13
- "resolveJsonModule": true,
14
- "isolatedModules": true,
15
- "jsx": "preserve",
16
- "incremental": true,
17
- "paths": {
18
- "@/*": ["./*"],
19
- "content-collections": ["./.content-collections/generated"]
20
- },
21
- "plugins": [
22
- {
23
- "name": "next"
24
- }
25
- ]
26
- },
27
- "include": [
28
- "next-env.d.ts",
29
- "**/*.ts",
30
- "**/*.tsx",
31
- ".next/types/**/*.ts",
32
- ".content-collections/generated"
33
- ],
34
- "exclude": ["node_modules"]
35
- }
@@ -1,19 +0,0 @@
1
- import Link from 'next/link';
2
-
3
- export default function HomePage() {
4
- return (
5
- <main className="flex flex-1 flex-col justify-center text-center">
6
- <h1 className="mb-4 text-2xl font-bold">Hello World</h1>
7
- <p className="text-fd-muted-foreground">
8
- You can open{' '}
9
- <Link
10
- href="/docs"
11
- className="text-fd-foreground font-semibold underline"
12
- >
13
- /docs
14
- </Link>{' '}
15
- and see the documentation.
16
- </p>
17
- </main>
18
- );
19
- }
@@ -1,6 +1,6 @@
1
+ import { source } from '@/lib/source';
1
2
  import { DocsLayout } from 'fumadocs-ui/layouts/docs';
2
3
  import { baseOptions } from '@/lib/layout.shared';
3
- import { source } from '@/lib/source';
4
4
 
5
5
  export default function Layout({ children }: LayoutProps<'/docs'>) {
6
6
  return (