mirror of
https://github.com/hanzoai/zod.git
synced 2026-09-24 17:04:49 +00:00
27 lines
713 B
TypeScript
27 lines
713 B
TypeScript
import { blogPosts, docs } from "@/.source";
|
|
import { loader } from "fumadocs-core/source";
|
|
import { createMDXSource } from "fumadocs-mdx";
|
|
import { icons } from "lucide-react";
|
|
import { createElement } from "react";
|
|
|
|
// `loader()` also assign a URL to your pages
|
|
// See https://fumadocs.vercel.app/docs/headless/source-api for more info
|
|
export const source = loader({
|
|
baseUrl: "/",
|
|
source: docs.toFumadocsSource(),
|
|
icon(icon) {
|
|
if (!icon) {
|
|
// You may set a default icon
|
|
return;
|
|
}
|
|
|
|
if (icon in icons) return createElement(icons[icon as keyof typeof icons]);
|
|
},
|
|
});
|
|
|
|
// Blog content loader
|
|
export const blog = loader({
|
|
baseUrl: "/blog",
|
|
source: createMDXSource(blogPosts),
|
|
});
|