This commit is contained in:
d34dscene
2026-02-04 06:57:42 +01:00
parent 3a8bb4d1e4
commit b2a63b968b
3 changed files with 7 additions and 4 deletions
+4 -4
View File
@@ -1,9 +1,9 @@
import { loader } from 'fumadocs-core/source';
import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
import { docs } from 'fumadocs-mdx:collections/server';
import { loader } from "fumadocs-core/source";
import { lucideIconsPlugin } from "fumadocs-core/source/lucide-icons";
import { docs } from "fumadocs-mdx:collections/server";
export const source = loader({
source: docs.toFumadocsSource(),
baseUrl: '/docs',
baseUrl: "/docs",
plugins: [lucideIconsPlugin()],
});
+2
View File
@@ -15,6 +15,8 @@ export const Route = createFileRoute("/docs/$")({
loader: async ({ params }) => {
const slugs = params._splat?.split("/") ?? [];
const data = await loader({ data: slugs });
// In production on GH Pages, the static server functions might be served from /mantrae/_server
// but the client-side router needs to know the absolute path relative to the domain if it's hitting the index.html
await clientLoader.preload(data.path);
return data;
},
+1
View File
@@ -42,6 +42,7 @@ export default defineConfig({
nitro({
prerender: {
autoSubfolderIndex: true,
crawlLinks: true,
},
}),
],