chore: add helix-api and workspace config to monorepo

This commit is contained in:
siujamo committed 2026-09-01 10:11:07 +08:00
1 parent c732624580
commit 112d0f3be4
40 files changed
+7145

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import type { Config } from '@react-router/dev/config';
import { glob } from 'node:fs/promises';
import { createGetUrl, getSlugs } from 'fumadocs-core/source';
const getUrl = createGetUrl('/docs');
export default {
ssr: false,
future: {
v8_middleware: true,
},
async prerender({ getStaticPaths }) {
const paths: string[] = [];
const excluded: string[] = ['/api-reference', '/api-reference/'];
for (const path of getStaticPaths()) {
if (!excluded.includes(path)) paths.push(path);
}
for await (const entry of glob('**/*.mdx', { cwd: 'content/docs' })) {
const slugs = getSlugs(entry);
paths.push(getUrl(slugs), `/llms.mdx/docs/${[...slugs, 'index.mdx'].join('/')}`);
}
return paths;
},
} satisfies Config;