mirror of
https://github.com/coollabsio/coolify-docs.git
synced 2026-06-19 07:35:55 +00:00
a64450ae9d
Replace VitePress/Vue stack with Fumadocs MDX, TanStack Start, React 19, and Vite. Migrate all documentation content to MDX under content/docs/. Add full src/ app with React components, routing, search, and API page. Remove Korrektly integration from CI/CD workflows, Dockerfile, and env vars. Update build pipeline to output to .output/public instead of docs/.vitepress/dist.
63 lines
1.6 KiB
TypeScript
63 lines
1.6 KiB
TypeScript
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
|
|
import mdx from 'fumadocs-mdx/vite';
|
|
import { nitro } from 'nitro/vite';
|
|
import { defineConfig } from 'vite';
|
|
import { getDocEntries } from './scripts/lib/content';
|
|
import { siteDefinition } from './config/site.shared';
|
|
|
|
const docEntries = await getDocEntries();
|
|
const prerenderDocPages = docEntries.map((doc) => ({
|
|
path:
|
|
doc.routeSegments.length === 0
|
|
? siteDefinition.docsBasePath
|
|
: `${siteDefinition.docsBasePath}/${doc.routeSegments.join('/')}`,
|
|
}));
|
|
const prerenderMarkdownPages = docEntries.map((doc) => ({
|
|
path: `${siteDefinition.docsBasePath}/llms.mdx/docs/${[...doc.routeSegments, 'content.md'].join('/')}`,
|
|
}));
|
|
|
|
export default defineConfig({
|
|
base: '/docs/',
|
|
server: {
|
|
port: 3000,
|
|
watch: {
|
|
ignored: ['**/.output/**', '**/node_modules/.nitro/**'],
|
|
usePolling: true,
|
|
interval: 1000,
|
|
},
|
|
},
|
|
plugins: [
|
|
mdx(await import('./source.config')),
|
|
tailwindcss(),
|
|
tanstackStart({
|
|
spa: {
|
|
enabled: true,
|
|
prerender: {
|
|
enabled: true,
|
|
crawlLinks: true,
|
|
},
|
|
},
|
|
pages: [
|
|
...prerenderDocPages,
|
|
...prerenderMarkdownPages,
|
|
{
|
|
path: `${siteDefinition.docsBasePath}/api/search`,
|
|
},
|
|
{
|
|
path: `${siteDefinition.docsBasePath}/llms.txt`,
|
|
},
|
|
{
|
|
path: `${siteDefinition.docsBasePath}/llms-full.txt`,
|
|
},
|
|
],
|
|
}),
|
|
react(),
|
|
nitro(),
|
|
],
|
|
resolve: {
|
|
tsconfigPaths: true,
|
|
},
|
|
});
|