source.ts•514 B
import { blog } from "@/.source";
import { loader } from "fumadocs-core/source";
import { createMDXSource } from "fumadocs-mdx";
import type { InferMetaType, InferPageType } from "fumadocs-core/source";
import type { PageTree } from "fumadocs-core/server";
export const blogSource = loader({
baseUrl: "/blog",
source: createMDXSource(blog),
});
export const {
getPage: getBlogPost,
getPages: getBlogPosts,
pageTree: pageBlogTree,
} = blogSource;
export type BlogPost = ReturnType<typeof getBlogPost>;