Files
MemShellParty/web/react-router.config.ts
T
ReaJason 17c171f1cd
Dev Deploy / Build Jar (ubuntu-latest) (push) Has been cancelled
Dev Deploy / Build Jar (windows-latest) (push) Has been cancelled
Dev Deploy / Docker Push (push) Has been cancelled
Dev Deploy / Deploy to Maven Central (push) Has been cancelled
Dev Deploy / Deploy to Northflank (push) Has been cancelled
ci: test build on windows
2025-12-24 23:37:49 +08:00

26 lines
835 B
TypeScript

import { glob } from "node:fs/promises";
import path from "node:path";
import { env } from "node:process";
import type { Config } from "@react-router/dev/config";
import { createGetUrl, getSlugs } from "fumadocs-core/source";
const getUrl = createGetUrl("/docs");
export default {
basename: env.VITE_APP_BASE_PATH,
ssr: false,
async prerender({ getStaticPaths }) {
const paths: string[] = [];
const excluded: string[] = [];
for (const path of getStaticPaths()) {
if (!excluded.includes(path)) paths.push(path);
}
const docsDir = path.resolve(process.cwd(), "content/docs");
for await (const entry of glob("**/*.mdx", { cwd: docsDir })) {
const normalizedEntry = entry.replace(/\\/g, "/");
paths.push(getUrl(getSlugs(normalizedEntry)));
}
return paths;
},
} satisfies Config;