create-bunspace 0.1.0 → 0.2.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.
- package/dist/bin.js +137 -6
- package/dist/templates/fumadocs/.env.example +49 -0
- package/dist/templates/fumadocs/.github/workflows/deploy.yml +89 -0
- package/dist/templates/fumadocs/CLAUDE.md +164 -0
- package/dist/templates/fumadocs/LICENSE +21 -0
- package/dist/templates/fumadocs/MUST-FOLLOW-GUIDELINES.md +269 -0
- package/dist/templates/fumadocs/README.md +319 -0
- package/dist/templates/fumadocs/biome.json +41 -0
- package/dist/templates/fumadocs/bun.lock +883 -0
- package/dist/templates/fumadocs/content-template/docs/getting-started/index.mdx +92 -0
- package/dist/templates/fumadocs/content-template/docs/getting-started/installation.mdx +168 -0
- package/dist/templates/fumadocs/content-template/docs/getting-started/quick-start.mdx +168 -0
- package/dist/templates/fumadocs/content-template/docs/index.mdx +70 -0
- package/dist/templates/fumadocs/content-template/en/docs/getting-started/index.mdx +92 -0
- package/dist/templates/fumadocs/content-template/en/docs/getting-started/installation.mdx +168 -0
- package/dist/templates/fumadocs/content-template/en/docs/getting-started/quick-start.mdx +168 -0
- package/dist/templates/fumadocs/content-template/en/docs/index.mdx +69 -0
- package/dist/templates/fumadocs/messages/en.json +14 -0
- package/dist/templates/fumadocs/messages/es.json +14 -0
- package/dist/templates/fumadocs/next.config.mjs +35 -0
- package/dist/templates/fumadocs/oxlint.json +14 -0
- package/dist/templates/fumadocs/package.json +35 -0
- package/dist/templates/fumadocs/postcss.config.mjs +5 -0
- package/dist/templates/fumadocs/source.config.ts +31 -0
- package/dist/templates/fumadocs/src/app/(home)/layout.tsx +6 -0
- package/dist/templates/fumadocs/src/app/(home)/page.tsx +132 -0
- package/dist/templates/fumadocs/src/app/api/search/route.ts +9 -0
- package/dist/templates/fumadocs/src/app/docs/[[...slug]]/page.tsx +62 -0
- package/dist/templates/fumadocs/src/app/docs/layout.tsx +11 -0
- package/dist/templates/fumadocs/src/app/en/docs/[[...slug]]/page.tsx +61 -0
- package/dist/templates/fumadocs/src/app/en/docs/layout.tsx +11 -0
- package/dist/templates/fumadocs/src/app/global.css +3 -0
- package/dist/templates/fumadocs/src/app/layout.tsx +47 -0
- package/dist/templates/fumadocs/src/app/llms-full.txt/route.ts +10 -0
- package/dist/templates/fumadocs/src/app/og/docs/[...slug]/route.tsx +27 -0
- package/dist/templates/fumadocs/src/components/language-selector.tsx +56 -0
- package/dist/templates/fumadocs/src/components/markdown-actions.tsx +61 -0
- package/dist/templates/fumadocs/src/config/site.config.ts +115 -0
- package/dist/templates/fumadocs/src/lib/layout.shared.tsx +23 -0
- package/dist/templates/fumadocs/src/lib/source.ts +91 -0
- package/dist/templates/fumadocs/src/mdx-components.tsx +14 -0
- package/dist/templates/fumadocs/tsconfig.json +46 -0
- package/package.json +1 -1
- package/templates/fumadocs/.env.example +49 -0
- package/templates/fumadocs/.github/workflows/deploy.yml +89 -0
- package/templates/fumadocs/CLAUDE.md +164 -0
- package/templates/fumadocs/LICENSE +21 -0
- package/templates/fumadocs/MUST-FOLLOW-GUIDELINES.md +269 -0
- package/templates/fumadocs/README.md +319 -0
- package/templates/fumadocs/biome.json +41 -0
- package/templates/fumadocs/bun.lock +883 -0
- package/templates/fumadocs/content-template/docs/getting-started/index.mdx +92 -0
- package/templates/fumadocs/content-template/docs/getting-started/installation.mdx +168 -0
- package/templates/fumadocs/content-template/docs/getting-started/quick-start.mdx +168 -0
- package/templates/fumadocs/content-template/docs/index.mdx +70 -0
- package/templates/fumadocs/content-template/en/docs/getting-started/index.mdx +92 -0
- package/templates/fumadocs/content-template/en/docs/getting-started/installation.mdx +168 -0
- package/templates/fumadocs/content-template/en/docs/getting-started/quick-start.mdx +168 -0
- package/templates/fumadocs/content-template/en/docs/index.mdx +69 -0
- package/templates/fumadocs/messages/en.json +14 -0
- package/templates/fumadocs/messages/es.json +14 -0
- package/templates/fumadocs/next.config.mjs +35 -0
- package/templates/fumadocs/oxlint.json +14 -0
- package/templates/fumadocs/package.json +35 -0
- package/templates/fumadocs/postcss.config.mjs +5 -0
- package/templates/fumadocs/source.config.ts +31 -0
- package/templates/fumadocs/src/app/(home)/layout.tsx +6 -0
- package/templates/fumadocs/src/app/(home)/page.tsx +132 -0
- package/templates/fumadocs/src/app/api/search/route.ts +9 -0
- package/templates/fumadocs/src/app/docs/[[...slug]]/page.tsx +62 -0
- package/templates/fumadocs/src/app/docs/layout.tsx +11 -0
- package/templates/fumadocs/src/app/en/docs/[[...slug]]/page.tsx +61 -0
- package/templates/fumadocs/src/app/en/docs/layout.tsx +11 -0
- package/templates/fumadocs/src/app/global.css +3 -0
- package/templates/fumadocs/src/app/layout.tsx +47 -0
- package/templates/fumadocs/src/app/llms-full.txt/route.ts +10 -0
- package/templates/fumadocs/src/app/og/docs/[...slug]/route.tsx +27 -0
- package/templates/fumadocs/src/components/language-selector.tsx +56 -0
- package/templates/fumadocs/src/components/markdown-actions.tsx +61 -0
- package/templates/fumadocs/src/config/site.config.ts +115 -0
- package/templates/fumadocs/src/lib/layout.shared.tsx +23 -0
- package/templates/fumadocs/src/lib/source.ts +91 -0
- package/templates/fumadocs/src/mdx-components.tsx +14 -0
- package/templates/fumadocs/tsconfig.json +46 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { docs, docsEn } from 'fumadocs-mdx:collections/server';
|
|
2
|
+
import { type InferPageType, loader } from 'fumadocs-core/source';
|
|
3
|
+
import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
|
|
4
|
+
import { siteConfig } from '@/config/site.config';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Base URL prefix computed from basePath.
|
|
8
|
+
* Combines the basePath (e.g., '/telegram-bot-manager') with the docs path.
|
|
9
|
+
*/
|
|
10
|
+
const basePrefix = siteConfig.basePath;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Source loader for Spanish documentation (default locale).
|
|
14
|
+
*
|
|
15
|
+
* @see {@link https://fumadocs.vercel.app/docs/headless/source Fumadocs Source}
|
|
16
|
+
*/
|
|
17
|
+
export const source = loader({
|
|
18
|
+
baseUrl: `${basePrefix}/docs`,
|
|
19
|
+
source: docs.toFumadocsSource(),
|
|
20
|
+
plugins: [lucideIconsPlugin()],
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Source loader for English documentation.
|
|
25
|
+
*
|
|
26
|
+
* @see {@link https://fumadocs.vercel.app/docs/headless/source Fumadocs Source}
|
|
27
|
+
*/
|
|
28
|
+
export const sourceEn = loader({
|
|
29
|
+
baseUrl: `${basePrefix}/en/docs`,
|
|
30
|
+
source: docsEn.toFumadocsSource(),
|
|
31
|
+
plugins: [lucideIconsPlugin()],
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Generates OpenGraph image metadata for a page.
|
|
36
|
+
*
|
|
37
|
+
* @param page - Page instance from source loader
|
|
38
|
+
* @returns Object with segments and URL for OG image
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* const image = getPageImage(page);
|
|
42
|
+
* // { segments: ['introduction', 'image.png'], url: '/og/docs/introduction/image.png' }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export function getPageImage(page: InferPageType<typeof source>) {
|
|
46
|
+
const segments = [...page.slugs, 'image.png'];
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
segments,
|
|
50
|
+
url: `${basePrefix}/og/docs/${segments.join('/')}`,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves the raw markdown content for LLM consumption.
|
|
56
|
+
*
|
|
57
|
+
* @param page - Page instance from source loader
|
|
58
|
+
* @returns Markdown string with title and processed content
|
|
59
|
+
* @deprecated Use {@link getRawMarkdownContent} instead
|
|
60
|
+
*/
|
|
61
|
+
export async function getLLMText(page: InferPageType<typeof source>) {
|
|
62
|
+
const processed = await page.data.getText('processed');
|
|
63
|
+
|
|
64
|
+
return `# ${page.data.title}
|
|
65
|
+
|
|
66
|
+
${processed}`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves the raw markdown content for copying/viewing.
|
|
71
|
+
*
|
|
72
|
+
* Formats the page content as raw markdown with the title as a heading.
|
|
73
|
+
* Used by the MarkdownActions component for "Copy as Markdown" functionality.
|
|
74
|
+
*
|
|
75
|
+
* @param page - Page instance from either source loader
|
|
76
|
+
* @returns Complete markdown string with title and content
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* const markdown = await getRawMarkdownContent(page);
|
|
80
|
+
* // "# My Page\n\nContent here..."
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export async function getRawMarkdownContent(
|
|
84
|
+
page: InferPageType<typeof source> | InferPageType<typeof sourceEn>
|
|
85
|
+
) {
|
|
86
|
+
const processed = await page.data.getText('processed');
|
|
87
|
+
|
|
88
|
+
return `# ${page.data.title}
|
|
89
|
+
|
|
90
|
+
${processed}`;
|
|
91
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import defaultMdxComponents from 'fumadocs-ui/mdx';
|
|
2
|
+
import { Steps } from 'fumadocs-ui/components/steps';
|
|
3
|
+
import { Tabs, Tab } from 'fumadocs-ui/components/tabs';
|
|
4
|
+
import type { MDXComponents } from 'mdx/types';
|
|
5
|
+
|
|
6
|
+
export function getMDXComponents(components?: MDXComponents): MDXComponents {
|
|
7
|
+
return {
|
|
8
|
+
Steps,
|
|
9
|
+
Tabs,
|
|
10
|
+
Tab,
|
|
11
|
+
...defaultMdxComponents,
|
|
12
|
+
...components,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": ".",
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"lib": [
|
|
6
|
+
"dom",
|
|
7
|
+
"dom.iterable",
|
|
8
|
+
"esnext"
|
|
9
|
+
],
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"forceConsistentCasingInFileNames": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"module": "esnext",
|
|
17
|
+
"moduleResolution": "bundler",
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"isolatedModules": true,
|
|
20
|
+
"jsx": "react-jsx",
|
|
21
|
+
"incremental": true,
|
|
22
|
+
"paths": {
|
|
23
|
+
"@/*": [
|
|
24
|
+
"./src/*"
|
|
25
|
+
],
|
|
26
|
+
"fumadocs-mdx:collections/*": [
|
|
27
|
+
".source/*"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"plugins": [
|
|
31
|
+
{
|
|
32
|
+
"name": "next"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"include": [
|
|
37
|
+
"next-env.d.ts",
|
|
38
|
+
"**/*.ts",
|
|
39
|
+
"**/*.tsx",
|
|
40
|
+
".next/types/**/*.ts",
|
|
41
|
+
".next/dev/types/**/*.ts"
|
|
42
|
+
],
|
|
43
|
+
"exclude": [
|
|
44
|
+
"node_modules"
|
|
45
|
+
]
|
|
46
|
+
}
|