]> juplo.de Git - website/commitdiff
Fix 404 for generated-doc entry links (apidocs, xref etc.)
authorKai Moritz <kai.milan.moritz@googlemail.com>
Mon, 15 Jun 2026 17:58:25 +0000 (17:58 +0000)
committerKai Moritz <kai.milan.moritz@googlemail.com>
Mon, 15 Jun 2026 17:58:25 +0000 (17:58 +0000)
Directory URLs like /apidocs/ fail without server-side index fallback;
link directly to /apidocs/index.html instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
src/lib/projects.ts

index 00f74e3932ca9dcf1e9774cc89ead986d6b8d397..feff57b1ac97eca7ffbfdfdc9db16684337ed6bf 100644 (file)
@@ -35,7 +35,7 @@ function generatedDocNodes(projectSlug: string, version: string, isCurrent: bool
   try { entries = readdirSync(pubDir); } catch { return []; }
   for (const [dirName, title] of Object.entries(GENERATED_DOC_NAMES)) {
     if (entries.includes(dirName)) {
-      nodes.push({ title, url: `${baseUrl}${dirName}/`, weight: -1, isNode: false, children: [] });
+      nodes.push({ title, url: `${baseUrl}${dirName}/index.html`, weight: -1, isNode: false, children: [] });
     }
   }
   return nodes;