mirror of
https://github.com/MizuchiLabs/mantrae.git
synced 2026-04-25 18:10:32 -05:00
crawl
This commit is contained in:
@@ -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()],
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
|
||||
@@ -42,6 +42,7 @@ export default defineConfig({
|
||||
nitro({
|
||||
prerender: {
|
||||
autoSubfolderIndex: true,
|
||||
crawlLinks: true,
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user