From fc25d65f940228f5ae3b16d109c8bcaf3999901c Mon Sep 17 00:00:00 2001 From: Adegoke Mofopefoluwa Daniel <110726038+mofopeadegoke@users.noreply.github.com> Date: Sun, 15 Nov 2026 05:17:31 +0200 Subject: [PATCH] fix(docs): normalize path separators in the content build on Windows path.relative returns backslash-separated paths on Windows, so navigation keys and page URLs (e.g. /introduction\index) never matched the forward-slash entries in meta.json, and content:generate failed with "Navigation /meta.json references missing page ./introduction/index". That also broke docs type-check and the repo's pre-push hook on Windows. Normalize the relative path to forward slashes once; it's a no-op on macOS and Linux. Fixes #10066 Co-Authored-By: Claude Opus 5.5 --- apps/docs/scripts/compile-content.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/docs/scripts/compile-content.ts b/apps/docs/scripts/compile-content.ts index 7081d373098..1aa1b7b7cfd 100644 --- a/apps/docs/scripts/compile-content.ts +++ b/apps/docs/scripts/compile-content.ts @@ -211,7 +211,8 @@ async function generate() { const dates = lastModified() let compiled = 0 for (const file of await filesIn(CONTENT_ROOT)) { - const relative = path.relative(CONTENT_ROOT, file) + // Navigation keys and page URLs below assume `/`; on Windows path.relative returns `\`. + const relative = path.relative(CONTENT_ROOT, file).split(path.sep).join('/') if (relative.endsWith('meta.json')) { const parsed = metadataSchema.safeParse(JSON.parse(await readFile(file, 'utf8'))) if (!parsed.success) throw new Error(`${relative}: ${parsed.error.message}`)