ci: test build on windows

This commit is contained in:
ReaJason
2026-01-12 02:12:34 +08:00
parent cbc71e5a52
commit 3e2fb861cd
5 changed files with 136 additions and 68 deletions
+5 -2
View File
@@ -1,4 +1,5 @@
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";
@@ -14,8 +15,10 @@ export default {
for (const path of getStaticPaths()) {
if (!excluded.includes(path)) paths.push(path);
}
for await (const entry of glob("**/*.mdx", { cwd: "content/docs" })) {
paths.push(getUrl(getSlugs(entry)));
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;
},